$PUTMESS_LOG_FILE | Uniface 9 | Forum

Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

—  Results per page  —








— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters
For a group of consecutive words like 'end of support' use Match phrase

sp_Feed Topic RSS sp_TopicIcon
$PUTMESS_LOG_FILE
25 Jul 2017
12:31 pm
Avatar
Claudio
Italy
Member
Forum Posts: 83
Member Since:
05 Jun 2016
sp_UserOfflineSmall Offline

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

26 Jul 2017
9:13 am
Avatar
gianni
Member
Forum Posts: 237
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

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

26 Jul 2017
11:53 am
Avatar
Claudio
Italy
Member
Forum Posts: 83
Member Since:
05 Jun 2016
sp_UserOfflineSmall Offline

gianni said

Which are your expectations/needs?

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

Claudio

26 Jul 2017
1:10 pm
Avatar
diseli
Admin
Forum Posts: 786
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

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

26 Jul 2017
2:38 pm
Avatar
Claudio
Italy
Member
Forum Posts: 83
Member Since:
05 Jun 2016
sp_UserOfflineSmall Offline

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

26 Jul 2017
3:24 pm
Avatar
diseli
Admin
Forum Posts: 786
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

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

26 Jul 2017
4:16 pm
Avatar
Claudio
Italy
Member
Forum Posts: 83
Member Since:
05 Jun 2016
sp_UserOfflineSmall Offline

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

28 Jul 2017
3:10 pm
Avatar
gianni
Member
Forum Posts: 237
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

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 24×7: 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

02 Aug 2017
2:30 pm
Avatar
Claudio
Italy
Member
Forum Posts: 83
Member Since:
05 Jun 2016
sp_UserOfflineSmall Offline

gianni said

It could be done with Uniface

Gianni  

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

Ciao,
Claudio

Forum Timezone: Europe/Amsterdam

Most Users Ever Online: 131

Currently Online:
19 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

ulrich-merkel: 1677

Iain Sharp: 596

Theo Neeskens: 333

gianni: 237

rogerw: 228

lalitpct: 195

istiller: 191

-GHAN-: 171

Knut: 168

sochaz: 165

Member Stats:

Guest Posters: 3

Members: 4727

Moderators: 0

Admins: 8

Forum Stats:

Groups: 1

Forums: 62

Topics: 1980

Posts: 8555

Newest Members:

RonnieArror, MashaEcs, CeccilCet, etcuvuqe, TotaluTwino, ueemporuveson, Kvas, Ernestastor, Roxbo, Aliafah

Administrators: admin: 23, Adrian Gosbell: 268, diseli: 786, Bob Maier: 2, Nico Peereboom: 58, Michael Rabone: 4, richiet: 406, JanCees: 25