Diagnostic log files

The diagnostic log files contain status information, warnings, error messages, and debugging messages. They offer information on the firmware start-up and operation of a controller of the PLCnext family. It is a good compromise between information and system performance.
You will find the files 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). Further information can be found in the topic  Connecting to the controller.

The diagnostic log files contain the following message types:

  • Error & Fatal: If messages of the Error or Fatal 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.19 08:24:15.830 MyLibrary.MyComponent INFO 'MyComponent' invoked of object with instance name 'MyLibrary.MyComponent-1'
18.05.19 08:24:15.831 Arp.Plc.Plm.Internal.PlmManager INFO Component 'MyLibrary.MyComponent-1' from library 'MyLibrary' created. 
18.05.19 08:24:15.831 MyLibrary.MyComponent INFO 'Initialize' invoked of object with instance name 'MyLibrary.MyComponent-1'
18.05.19   08:24:15.832  MyLibrary.MyComponent INFO 'SubscribeServices' invoked of object with in­stance name 'MyLibrary.MyComponent-1'
18.05.19 08:24:15.832  MyLibrary.MyComponent INFO Component 'AcfDemo' not found!
18.05.19  08:24:15.833  MyLibrary.MyComponent INFO  'LoadSettings' invoked of object with instance name 'MyLibrary.MyComponent-1' 
18.05.19  08:24:15.833  MyLibrary.MyComponent INFO  'SetupSettings' invoked of object with instance name 'MyLibrary.MyComponent-1'
18.05.19 

08:24:15.834

MyLibrary.MyComponent INFO 'LoadConfig' invoked of object with instance name 'MyLibrary.MyComponent-1'
18.05.19  08:24:15.834 MyLibrary.MyComponent INFO 'SetupConfig' invoked of object with instance name 'MyLibrary.MyComponent-1'
18.05.19 08:24:15.988 MyLibrary.MyComponent.MyProgram INFO Added Port 'zaehler (of Data Type 8)' of instance MyLibrary.MyComponent-1/MyProgram1
18.05.19 08:24:15.989 MyLibrary.MyComponent.MyProgram INFO Added Port 'zaehler (of Data Type 8)' of instance MyLibrary.MyComponent-1/P1
18.05.19 08:24:16.121 Arp.Io.Axioline.AxiolineComponent INFO Axioline: Load configuration.
18.05.19 08:24:16.127 Arp.Io.Axioline.AxiolineComponent INFO AxiolineComponent::LoadPlc() Path=/opt/plc­next/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

In the following sections you will find descriptions on the log files from firmware version 2025.0, up to firmware version 2024.6 and a description on the enhanced debug log.

Log files from firmware version 2025.0

To filter and find log messages more easily, there are multiple log files from firmware version 2025.0. The diagnostic log files are configured as rolling files. There is 1 backup file per log file. When the log file is full, the data is saved in the corresponding backup file.

Log files

Log file Size Description
Arp.log 16 MB Main log file
All loggers starting with Arp.*, Eclr and CommonRemoting log to this file (see exceptions below). 
Arp.Io.ProfinetStack.log 2 MB Log file for the log messages of the PROFINET component. 
Arp.Services.SpnsProxy.log 2 MB Log file for the log messages of the SPNS component. 
Arp.Services.Ehmi.log 2 MB Log file for the log messages of the eHMI component. 
Arp.Init.log 1 MB Additional log file to store identification and version information at system start. The purpose of this file is to store persistently some important information that would otherwise be overwritten by log file rotation. These include:
- Firmware version
- Vendor, article name, article number, hardware revision, serial number
- FPGA version
- SPNS firmware version
- PCIe extensions: vendor, article name
- File system: size, free space
- External SD card: present, enabled, free space
- Function and location, initial value and changes
- Network interfaces (no IP address configuration, since it is too volatile)
Custom.log 2 MB An additional log file will be created for customer messages, for example for every logger whose name does not start with Arp (see exceptions above)

arp-merge-logs

To evaluate the separate log files in a common context, you can merge them using the arp-merge-logs tool. The tool reads all log files, parses the timestamps and merges all configured input files. Per default configuration all available log files are merged and all messages are printed to stdout.

For this you need to open an ssh session using a command line tool (e.g., PuTTY). 

Use the arp-merge-logs --help command to call a description of the individual functions of the tool.

 

Configuration of the arp-merge-logs tool

Use the cat /etc/arp-merge-logs.conf command to call up the current configuration of the tool and display it on the standard output.

In the configuration file you can edit the log files to be merged, the pattern of the time stamp and the output path. If you want to customize the configuration, copy the file from the file system of the controller and edit it with a suitable editor. When editing, note the comments (starting with #) in the configuration file. Save the modified file under a suitable path (for example /opt/plcnext/logs/arp-merge-logs.config). Set the new path in the arp-merge-logs tool with the -f or --fileconfig option to apply your configuration.

Log files up to firmware version 2024.6

Up to firmware version 2024.6, there is one log file for all components of the firmware. The Output.log diagnostic log file contains status information, warnings, error messages, and debugging messages. You will find the file in the /opt/plcnext/logs folder on the file system of your controller. 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.

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 to  DEBUG 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.
  • After all necessary logs have been collected, the changed logging configuration has to be reverted.
    Recommended: Remove the file /media/rfs/rw/upperdir/etc/plcnext/Device.log.ini and reboot the PLC. 
    ↪ This procedure ensures that no Device.log.ini persists in the overlay file system which may cause problems when the firmware is later upgraded or downgraded.

Template Loggable

You can apply tags to log messages from components, programs or other code elements. See  Common classes for more information.

 

 

 


• Published/reviewed: 2025-06-06  ✿  Revision 080 •