Showing posts with label logging. Show all posts
Showing posts with label logging. Show all posts

Tuesday, 19 May 2020

Exception Handling in Jython | IBM Maximo

from psdi.util.logging import MXLoggerFactory
from psdi.util.logging import MXLogger


try:
       
    log = MXLoggerFactory.getLogger("maximo.application.AUTOSCRIPT")
    scriptname="<script name>"
    log.info("******Entering Autoscript : " +scriptname +"******")
       
   
    log.debug("[DEBUG] script "+scriptname+" <Message>")
   
    log.info("******Existing Autoscript : " +scriptname +"******")   

Exceptions Handling

except Exception, e:
    print >> sys.stderr, "[ERROR] script "+scriptname+" failed: ",e.message
    print >> sys.stdout, "[ERROR] script "+scriptname+" failed: ",e.message
    log.error("[ERROR] script "+scriptname+" failed: " +e.message)

Monday, 23 October 2017

Syslog Configuration in Routers | Cisco

Syslog Configuration in Packet Tracer

router >
enable
configure terminal
int fa 0/1
ip address 192.168.0.100 255.255.255.0
no shutdown
exit
logging 192.168.0.1 #ip of syslog server


now connect a Syslog server with router int fa0/1
and set ip same as mentioned in logging 192.168.0.1


:) we are done.


Friday, 11 November 2016

Simplified Procedure to Generate Maximo Logs | IBM Maximo

Logger = sql
Log Level = INFO
Appenders = Console,Rolling

Logger = application
Log Level = DEBUG
Appenders = Console,Rolling

Hit Save button
 
Select Action > Apply Settings
Done :)

Reference:

Monday, 21 December 2015

How to Enable Logger or Generate Maximo Logs | IBM Maximo

Go to System Configuration > Platform Configuration > Logging. 
  1. Logger = sql
  2. Log Level = INFO
  3. Appenders = Console,Rolling