Fiorano 10.3.0 allows you to write product logs directly to the Windows Event Viewer.
In case you are using a Windows machine, please follow the steps illustrated in the below sections to enable writing to Windows Event Viewer from the logger of your choice.
Enabling for ESB Logger
Default Log Appender is already present in the Fiorano framework, which enables to write FES/FPS logs to Windows Event Viewer. There are two ways of enabling this feature; enable it either through eStudio or by amending the Configs.xml file present inside the respective Logger from which you want to write logs.
Enabling Logger using eStudio
Using eStudio, you just need to enable Logging for 'WinEvent4jOut' and 'WinEvent4jErr' appenders.
To enable ESB Logger using eStudio, perform the following actions in eStudio:
- Open ProfileManagement perspective (Window > Open perspective > Other > Profile Management).
Load the required profile for the ESB server.
- Navigate to Fiorano > Loggers > Fiorano.Esb
- In the Appenders listed, click each appender to find AppenderName property values as below:
- WinEvent4jOutAppender
- WinEvent4jErrAppender
In both the appenders specified above, change the LoggingEnabled value to 'true' from its default value 'false'.
- Save the profile and start the server. When the server starts, the logs start writing to the Windows Event Viewer.
Figure1: WinEvent4jOutAppender with the LoggingEnabled default value in ESB Logger
Enabling Logger using Configs.xml file
- The other way is to enable Logging for 'WinEvent4jOut' and 'WinEvent4jErr' appenders manually by opening Configs.xml file directly from the server location in the Fiorano framework.
- To enable ESB Logger using Configs.xml file, first ensure that the required server is stopped and then perform the following actions:
- Open Configs.xml file by navigating through FioranoHome > esb > server > profiles > <RequiredProfile> > FES/FPS > conf
- In the Appenders listed as elements, find AppenderName values as below:
- WinEvent4jOutAppender
- WinEvent4jErrAppender
- In both the appenders specified above, edit the LoggingEnabled value to 'true' from its default value 'false'.
Figure 2: WinEvent4jOutAppender and WinEvent4jErrAppender with LoggingEnableddefault values in Configs.xml file
- Save the Configs.xml file and restart the server. When the server starts, the logs start writing to the Windows Event Viewer.
Enabling for Other Loggers
As mentioned earlier, the default Log Appender is already present in ESB profiles for writing ESB logs to Windows Event Viewer. You can enable writing other logs also to Windows Event Viewer by copying the Log Appenders from ESB logger to the other logger that you choose, again, by using eStudio or from the physical profile location.
The ways to do this is explained below by taking MQ as an example, that is, to write MQ logs to Windows Event Viewer.
Enabling MQ Logger using eStudio
Using eStudio, you need to copy the 'WinEvent4jOut' and 'WinEvent4jErr' appenders, paste them in the MQ Logger and then enable Logging on both.
- To enable MQ Logger using eStudio, perform the following actions in eStudio:
- Follow the steps till Step 4 mentioned in "Enabling Logger using eStudio" section.
- Right-click the pre-configured 'WinEvent4jOutAppender' and select Copy to copy the Windows Event appender from the ESB Logger.
Figure 3: Copying appenders from FES/FPS profile
Now open MQ loggers by navigating to Fiorano > Loggers > Fiorano
- Right-click and select Paste to paste the copied appender to MQ Logger.
Figure 4: Pasting the copied appender to MQ logger
- Change the name of the appender to suit your requirement and also change the LoggingEnabled default value from 'false' to 'true'. In the figure below, the text "Mq" is added to the appender names and LoggingEnabled value changed to 'true'.
Figure 5: Renaming appender name and changing LoggingEnabled default values
Now you have to copy, rename and change LoggingEnabled default value for 'WinEvent4jErrAppender' also to copy the Error Logger. To do this, perform the same actions on 'WinEvent4jErrAppender' also by following steps 2 to 5 mentioned above.
- Save the profile and start servers. The logger to which the appender was added, that is, MQ logger would start writing logs to the Windows Event Viewer.
Enabling MQ Logger using Configs.xml file
- The other way is to open the Configs.xml file directly from the server location in the Fiorano framework and then copy the 'WinEvent4jOut' and 'WinEvent4jErr' appenders, paste them in the MQ Logger, and finally enable Logging on both appenders and also rename the appenders to match the Logger name.
- To enable MQ Logger using Configs.xml file, first ensure that the required server is stopped and then perform the following actions:
- Open Configs.xml file by navigating through FioranoHome > esb > server > profiles > <profile> > FES/FPS > conf
- In the Appenders listed as elements, find AppenderName values as below (see Figure 2):
- WinEvent4jOutAppender
- WinEvent4jErrAppender
- Copy the appenders specified above and paste them within the MQ Logger tag to become a part of MQ Appender elements.
- Change the LoggingEnabled value present in both the appenders from it default value 'false' to 'true'.
Rename both the appenders to represent the new Logger and referring your requirement. In the figure below, "Mq" is added to both appender names.
Figure 7: Appender elements with their names changed and LoggindEnabled value changed to 'true'
- Save the Configs.xml file and restart the server. When the server starts, the MQ logs start writing to the Windows Event Viewer.