Diagnostic log file Output.log
The Output.log diagnostic log file contains status information, warnings, error messages, and debugging messages. It offers a lot information of the boot up and operation of a controller of the PLCnext family. It is a good compromise between information and system performance.
You will find the file in the /opt/plcnext/logs folder on the file system of your controller. The file system can be accessed via the SFTP protocol. The SFTP client software is required for this (e.g., WinSCP).
The diagnostic log file Output.log is configured as a rolling file in the configuration file /etc/plcnext/Device.log.ini. If the file is > 16 MB, old log messages are stored in a separate file. These separate files are created with an index starting from 1, e.g. /opt/plcnext/logs/Output.log.1. Every file with an index can be copied for evaluation.
The diagnostic log file contains the following message types:
- Error & Fatal: If messages of the
Error
orFatal
type are issued, the controller is stopped. The errors mainly arise during startup, or during execution of a user program. - Warning: Messages of type
Warning
indicate potentially occurring errors. - Information: The core components issue messages of the
Information
type. These provide an overview of the system status.
Example of an Output.log diagnostic log file:Click to show an example of an Output.log diagnostic log file
A | B | C | D | E |
18.05.07 | 08:24:15.830 | MyLibrary.MyComponent | INFO | 'MyComponent' invoked of object with instance name 'MyLibrary.MyComponent-1' |
18.05.07 | 08:24:15.831 | Arp.Plc.Plm.Internal.PlmManager | INFO | Component 'MyLibrary.MyComponent-1' from library 'MyLibrary' created. |
18.05.07 | 08:24:15.831 | MyLibrary.MyComponent | INFO | 'Initialize' invoked of object with instance name 'MyLibrary.MyComponent-1' |
18.05.07 | 08:24:15.832 | MyLibrary.MyComponent | INFO | 'SubscribeServices' invoked of object with instance name 'MyLibrary.MyComponent-1' |
18.05.07 | 08:24:15.832 | MyLibrary.MyComponent | INFO | Component 'AcfDemo' not found! |
18.05.07 | 08:24:15.833 | MyLibrary.MyComponent | INFO | 'LoadSettings' invoked of object with instance name 'MyLibrary.MyComponent-1' |
18.05.07 | 08:24:15.833 | MyLibrary.MyComponent | INFO | 'SetupSettings' invoked of object with instance name 'MyLibrary.MyComponent-1' |
18.05.07 |
08:24:15.834 |
MyLibrary.MyComponent | INFO | 'LoadConfig' invoked of object with instance name 'MyLibrary.MyComponent-1' |
18.05.07 | 08:24:15.834 | MyLibrary.MyComponent | INFO | 'SetupConfig' invoked of object with instance name 'MyLibrary.MyComponent-1' |
18.05.07 | 08:24:15.988 | MyLibrary.MyComponent.MyProgram | INFO | Added Port 'zaehler (of Data Type 8)' of instance MyLibrary.MyComponent-1/MyProgram1 |
18.05.07 | 08:24:15.989 | MyLibrary.MyComponent.MyProgram | INFO | Added Port 'zaehler (of Data Type 8)' of instance MyLibrary.MyComponent-1/P1 |
18.05.07 | 08:24:16.121 | Arp.Io.Axioline.AxiolineComponent | INFO | Axioline: Load configuration. |
18.05.07 | 08:24:16.127 | Arp.Io.Axioline.AxiolineComponent | INFO | AxiolineComponent::LoadPlc() Path=/opt/plcnext/projects/PCWE/Io/Arp.Io.AxlC/links.xml |
A |
Date of the message in the format DD.MM.YY |
B |
Time of the message in the format hh:mm:ss.ms |
C |
Component that triggers the message |
D |
Message type (log level) |
E |
Message, e.g., info text, error message, debugging message |
Enhanced Debug Log
Note: Activate the enhanced PLCnext Debug Log
mode only if you are requested to do so by the support.
For a deeper insight into the system, it is possible to activate an extended log mode. In addition to the messages of typeError
, Warning
, and Information
, this also displays the developmentDebug
messages. To activate the extended mode, change the configuration of the /etc/plcnext/Device.log.ini (e.g. /etc/plcnext/AXCF2152.log.ini) as follows.
Note: The enhanced logging generates a higher system load that might influence the timing of running applications.
Phoenix Contact strongly recommends to deactivate the enhanced logging after usage.
Preconditions:
For the modification of the *.log.ini (e.g. AXCF2152.log.ini) a root user is necessary. How to create a root user can be read here. Be sure to observe all warnings.
- Open the configuration file *.log.ini (e.g. AXCF2152.log.ini) on the file system of your controller under \etc\plcnext.
- Change the threshold key from
INFO
toDEBUG
as in the following example:
log4cplus.rootLogger=DEBUG, ConsoleAppender1, RollingFileAppender1, SysLogAppender1
#SysLogAppender1:
log4cplus.appender.SysLogAppender1=log4cplus::AsyncAppender
log4cplus.appender.SysLogAppender1.Appender=log4cplus::SysLogAppender
log4cplus.appender.SysLogAppender1.Appender.layout=log4cplus::PatternLayout
log4cplus.appender.SysLogAppender1.Appender.layout.ConversionPattern=%c %p - %m%n
log4cplus.appender.SysLogAppender1.Appender.Threshold=INFO
#ConsoleAppender1:
log4cplus.appender.ConsoleAppender1=log4cplus::AsyncAppender
log4cplus.appender.ConsoleAppender1.Appender=log4cplus::ConsoleAppender
log4cplus.appender.ConsoleAppender1.Appender.layout=log4cplus::PatternLayout
log4cplus.appender.ConsoleAppender1.Appender.layout.ConversionPattern=%d{%d.%m.%y %H:%M:%S.%q} %-30.30c %-5p - %m%n
log4cplus.appender.ConsoleAppender1.Appender.Threshold=INFO
#RollingFileAppender1
log4cplus.appender.RollingFileAppender1=log4cplus::AsyncAppender
log4cplus.appender.RollingFileAppender1.Appender=log4cplus::RollingFileAppender
log4cplus.appender.RollingFileAppender1.Appender.File=/opt/plcnext/logs/Output.log
log4cplus.appender.RollingFileAppender1.Appender.CreateDirs=true
log4cplus.appender.RollingFileAppender1.Appender.MaxFileSize=16MB
log4cplus.appender.RollingFileAppender1.Appender.MaxBackupIndex=1
log4cplus.appender.RollingFileAppender1.Appender.layout=log4cplus::PatternLayout
log4cplus.appender.RollingFileAppender1.Appender.layout.ConversionPattern=%d{%d.%m.%y %H:%M:%S.%q} %-60c %-5p - %m%n
log4cplus.appender.RollingFileAppender1.Appender.Threshold=DEBUG
- After you have changed the configuration file, save the changes and reboot the controller.
The enhanced logging is now active and the message type DEBUG
is now available in the Output.log file as in the following example:
30.11.17 | 16:23:07.263 | OpcServer | INFO |
OPC UA server opened endpoint URI opc.tcp://axc-f-2152-1:4840 listening at opc.tcp://0.0.0.0:4840 |
30.11.17 | 16:23:07.264 | Arp.Services.OpcUAServer.Internal.Security.SessionManager | DEBUG | Start - ENTRY |
30.11.17 | 16:23:07.264 | Arp.Services.OpcUAServer.Internal.Security.SessionManager | DEBUG | Start - creating new thread |
30.11.17 | 16:23:07.265 | Arp.System.Rsc.ServiceManager | DEBUG | Create local service 'Arp:Arp.System.Um.Services.Internal.IPasswordAuthenticationService' |
30.11.17 | 16:23:07.267 | Arp.Services.OpcUAServer.Internal.Security.SessionManager | DEBUG | Start - new thread is started |
30.11.17 | 16:23:07.268 | Arp.Services.OpcUAServer.Internal.Security.SessionManager | DEBUG | Start - RETURN |
30.11.17 | 16:23:07.267 | Arp.System.Commons.Threading.Thread | DEBUG | Thread 'OpcUAServer::Se' starts. |
30.11.17 | 16:23:07.269 | Arp.Services.OpcUAServer.OpcUAServerComponent | DEBUG | StartPlc - RETURN |
30.11.17 | 16:23:07.270 | Arp.System.Acf.Internal.Sm.ComponentsController | DEBUG | Started component'Arp.Services.OpcUAServer' in process 'MainApplication'. |
30.11.17 | 16:23:07.271 | Arp.System.Acf.Internal.Sm.ComponentsController | DEBUG | Starting component 'Arp.Services.ProfiCloud' in process 'MainApplication'. |
30.11.17 | 16:23:07.272 | Arp.Services.ProfiCloud.ProfiCloudComponent | DEBUG | StartPLC - Starting Proficloud connection |
30.11.17 | 16:23:07.272 | Arp.Services.ProfiCloud.Internal.ProficloudTSDAdapter | INFO |
No metrics configured. Will not connect to Proficloud. |
30.11.17 | 16:23:07.273 | Arp.System.Acf.Internal.Sm.ComponentsController | DEBUG | Started component'Arp.Services.ProfiCloud' in process 'MainApplication'. |
30.11.17 | 16:23:07.275 | Arp.System.Acf.Internal.Sm.ComponentsController | DEBUG | Starting component 'Arp.Services.Wbm' in process 'MainApplication'. |
30.11.17 | 16:23:07.276 | Arp.System.Commons.Threading.Thread | DEBUG | Thread 'SessionTimeoutW' starts. |
30.11.17 | 16:23:07.277 | Arp.System.Acf.Internal.Sm.ComponentsController | DEBUG | Started component'Arp.Services.Wbm' in process 'MainApplication'. |
30.11.17 | 16:23:07.279 | Arp.System.Acf.Internal.ApplicationBase | INFO | Application 'MainApplication' was setup successfully. |
30.11.17 | 16:23:07.279 | Arp.Device.HmiLed.Internal.LedManager | DEBUG | Receive State 0x00000003 from Arp.System.Acf.Internal.Sm.SystemManager |
30.11.17 | 16:23:07.277 | Arp.System.Commons.Threading.Thread | DEBUG | Thread 'WbmFcgiServerTh' starts. |
Template Loggable
You can apply tags to log messages from components, programs or other code elements. See Common classes for more information.