# linuxplc.log gets huge real quick

P

#### Philip Costigan

Hi all,

In the perl program called demo in the demo/basic directory there is a polling routine that monitors the point quit.

while (1) {
$quit = ../../smm/plctest -g quit; if ($quit =~ /quit = 1/)
{
last
}
}

In half a minute linuxplc.log grows to about 2meg.
The contents is thus.

<snip>

Thu Sep 21 23:31:20 2000
- TRACE - test - Closing logging files.
Thu Sep 21 23:31:20 2000
- WARNING - test - Cannot append to log file (null).
Thu Sep 21 23:31:20 2000
- WARNING - test - Cannot append to log file (null).
Thu Sep 21 23:31:20 2000
- WARNING - test - Cannot append to log file (null).
Thu Sep 21 23:31:20 2000
- TRACE - test - Initialized logging files.
Thu Sep 21 23:31:20 2000
- TRACE - test - Closing logging files.
Thu Sep 21 23:31:20 2000
- WARNING - test - Cannot append to log file (null).
Thu Sep 21 23:31:20 2000
- WARNING - test - Cannot append to log file (null).
Thu Sep 21 23:31:20 2000
- WARNING - test - Cannot append to log file (null).

<\snip>

(Real time logging wow

What is happening here that test can't append to the log file.

I understand that the while loop is repeating very often and hence the file
grows quickly but I don't understand why I get the warning.

regards

Phil

_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc

C

#### Congres 06

On 21 Sep 00, at 23:32, Philip Costigan wrote:

> Hi all,
>
> In the perl program called demo in the demo/basic directory there is a polling
> routine that monitors the point quit.

Every time the plc_init() is called (and log_init() called too) the log file is started. The default file name NULL pointer is passed along,
and the logger cannot open this file, so it reverts to linuxplc.conf, and places a warning there that it could not open the <NULL> file.

I think you can disable this for the moment with --PLCdebug=0
(I had raised the default debugging level to 1 some time ago)

I will fix this when I get back home. Actually, we should define a policy for message logging too, that will help in deciding what the default level should be and if those warning messages should be logged to level 1.

The logger is still very embrionic. Im expecting to expand it to allow passing all the messages to sysconfd if so configured...

Sorry for the trouble. I should be back home on monday. Ill fix it then somehow...

Mario.

_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc

J

#### Jiri Baum

Philip Costigan:
> > In the perl program called demo in the demo/basic directory there is a
> > polling routine that monitors the point quit.

Mario:
> I think you can disable this for the moment with --PLCdebug=0
> (I had raised the default debugging level to 1 some time ago)

Done.

> I will fix this when I get back home.

Actually, it's probably not worth it - the Perl script should be rewritten in C and only initialize the SMM once. The launcher-monitor-slayer thing.

Jiri
--
Jiri Baum <[email protected]>
What we do Every Night! Take Over the World! Step 1 - bid for SMOFcon

_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc