Skip to Main Content
Status Under Review
Categories Natural (NAT)
Created by Mogens Lundqvist
Created on Jul 15, 2021

’Natural Log File (.LOG)’ and ’Trace File (.TRC)’ name options for more granularity

Please make it possible to have the option to have process-id and timestamp included into these file names.

Today for .LOG files you may have the process-id included but only if ETID was set to $$.

Also the uniqueness of the file name today may be too poor not to get collisions on file name used. Subsequent runs may over write previous log files. Maybe you also not want to have your etid assigned the value of process-id ($$).

Today for .TRC files you get a count (nnn) appended to userid. Again this may easily cause overrun when customer uses same userid for many Natural sessions/jobs.

Suggestion/example for new parameters to set contents for .LOG and .TRC files:

New parameters NATLOGPATTERN and TRCPATTERN.

For these parameters below variables may be used and substituted according to the description:

- is substituted by process-id of session

- is substituted by timestamp (note this value must be detailed enough not to get collisions between sessions started just after each other, value could be similar to Natural’s *TIMESTMP)

Examples:

NATLOGPATTERN= (example; the filename will then be NATURAL_4711_D324705000BFB000.LOG)

NATLOGPATTERN= (example; the filename will then be NATURAL_D324705000BFB000_4711.LOG)

NATLOGPATTERN= (example; the filename will then be NATURAL_4711.LOG)

NATLOGPATTERN= (example; the filename will then be NATURAL_D324705000BFB000.LOG)

TRCPATTERN== (example; the filename will then be _4711_D324705000BFB000.TRC)

And so on ... similar to examples for NATLOGPATTERN.

IF parameters NATLOGPATTERN and TRCPATTERN are not set, the old rules will apply.

Also note that the same time stamp value is basis for the values assigned when generation the value for .LOG and .TRC files for the same session. Make sure the time stamp is not taken individual for each file. Example:

.LOG file name must not get the value

NATURAL_4711_D324705000BFB000.LOG

where .TRC file name gets

_4711_D324705000BFC000.TRC

(note the difference in time stamp)

could also be a more sophisticated parameter where you have the option to specify date and time edit masks (YYYY, MM, DD, HH, II). JUST NOTE, it must be possible to define a value that makes it unique from other sessions!


Created on Brainstorm 09/15/2017 03:23 AM
Brainstorm ID 5235
  • +1