$PUTMESS_LOG_FILE

Author: claudio.palladini@cortislentini.it (Claudio)

Hello, in my ASN I've defined

$PUTMESS_LOG_FILE = N:\Uniface\MyUser\LOG\log.txt /append Where N is a network share specific for every user. From help:

You can use /append for rotating files to continue the rotation. If files exist with the same name and sequence numbers they will continue to be used.

Note: Never share rotating log files over multiple concurrent sessions. The size calculations will not be accurate.

  There seems to be some problem with the length of the file, but it should work. At now the file growth continuously, what I've wrong? I've already tried "TotalSize" and "Count" but it does not fit my needs. --EDIT-- I'm using Uniface 9.6.05.01 (0519_1) on Win 7 64x Thanks in advance, Claudio

8 Comments

  1. Ciao Claudio, Full syntax is: $PUTMESS_LOG_FILE | $PUTMESS_LOGFILE {=} Filename {, totalsize=n} {, count=p} What do you mean with "I’ve already tried “TotalSize” and “Count” but it does not fit my needs.". Which are your expectations/needs? Gianni


    Author: gianni (gianni.sandigliano@unifacesolutions.com)
  2. gianni said Which are your expectations/needs?

    Hi, I want one log file that rotates once reached size... Claudio


    Author: Claudio (claudio.palladini@cortislentini.it)
  3. Claudio said Hi, I want one log file that rotates once reached size... Claudio  

    Hi Claudio, I'm afraid that is not possible. In case you want to use rotating log files then the minimum number of files used in rotating log files is 2. So you'll get two log files that have a max size of totalsize/2 (e.g. totalsize=10000 will result in 2x log files with a max size of 5MB). And rotating log files are only enabled when either specifying the parameter totalsize or count. In case you only specify the /append switch for $putmess_log_file then no max size is used. Hope this helps. Daniel


    Author: diseli (daniel.iseli@uniface.com)
  4. diseli said
    Claudio said Hi, I want one log file that rotates once reached size... Claudio  
    Hi Claudio, I'm afraid that is not possible. In case you want to use rotating log files then the minimum number of files used in rotating log files is 2. So you'll get two log files that have a max size of totalsize/2 (e.g. totalsize=10000 will result in 2x log files with a max size of 5MB). And rotating log files are only enabled when either specifying the parameter totalsize or count. In case you only specify the /append switch for $putmess_log_file then no max size is used. Hope this helps. Daniel  

    Hi Daniel, thank you for your confirmation. I was thinking of using "%d" in the filename, but I would not want the files to proliferate. Is there a workaround/best practice with Uniface? Thanks again, Kind Regards Claudio


    Author: Claudio (claudio.palladini@cortislentini.it)
  5. Claudio said Hi Daniel, thank you for your confirmation. I was thinking of using "%d" in the filename, but I would not want the files to proliferate. Is there a workaround/best practice with Uniface? Thanks again, Kind Regards Claudio  

     Hi Claudio, Thanks for your reply and you are welcome. I'm not sure what "%d" should do, but (AFAIK) there is no such identifier for $PUTMESS_LOG_FILE. And I currently cannot think of any workaround. While Uniface is running the log file is locked and cannot be deleted or cleared. If you really want to limit the maximum size of a log file then rotating log files are currently the only possibility (I'm aware off). I guess you have to get used to the current behavior. But maybe someone else has a better idea? Hope this helps. Kind regards, Daniel


    Author: diseli (daniel.iseli@uniface.com)
  6. diseli said
    Claudio said Hi Daniel, thank you for your confirmation. I was thinking of using "%d" in the filename, but I would not want the files to proliferate. Is there a workaround/best practice with Uniface? Thanks again, Kind Regards Claudio  
     Hi Claudio, Thanks for your reply and you are welcome. I'm not sure what "%d" should do, but (AFAIK) there is no such identifier for $PUTMESS_LOG_FILE. And I currently cannot think of any workaround. While Uniface is running the log file is locked and cannot be deleted or cleared. If you really want to limit the maximum size of a log file then rotating log files are currently the only possibility (I'm aware off). I guess you have to get used to the current behavior. But maybe someone else has a better idea? Hope this helps. Kind regards, Daniel  

    Sorry, mistyped I mean %p Thanks Claudio


    Author: Claudio (claudio.palladini@cortislentini.it)
  7. diseli said
    Claudio said Hi Daniel, thank you for your confirmation. I was thinking of using "%p" in the filename, but I would not want the files to proliferate. Is there a workaround/best practice with Uniface? Thanks again, Kind Regards Claudio  
    ... But maybe someone else has a better idea? Hope this helps. Kind regards, Daniel  

    IMHO - batch applications running 24x7: they require log rotation. - interactive online sessions: a single file shared between many users is NOT usable when you will have the desperate need to get some info from it...what about adding %p and build a small nightly batch session checking logfiles size and number, and reducing them as needed or delete files older than N days? It could be done with Uniface, Powershell on Windows, bash on unix... Gianni


    Author: gianni (gianni.sandigliano@unifacesolutions.com)
  8. gianni said It could be done with Uniface Gianni  

    Gianni, thanks for the suggestion, I had evaluated as last option.Wink Ciao, Claudio


    Author: Claudio (claudio.palladini@cortislentini.it)