New Ranks & Badges For The Community!
Notice something different? The ranks and associated badges have gone "Star Fleet". See what they all mean HERE
Fleet Admiral Fleet Admiral
Fleet Admiral

logging in EPI Scripting

Hello Support, I am using following to log messages in EPI scripts. 


import org.apache.commons.logging.Log 
import org.apache.commons.logging.LogFactory 
private static Log s_log = LogFactory.getLog ("MyClass.class.getName()"); 

def init() 
 s_log.error("DEBUG:Script init") 




if i use s_log.error, i see the message in the opr-scripting-host.log but if i use, i dont see any message there.


is it possible to redirect these messages in some other file? if yes what additional lines needs to be added?


also, is it possible to enable/disable this logging on somwhere at top level? means i always want to add such logging in my script but when it is moved to prod set the loggin off. if troubleshooting is required switch it back to on.


Any help would be appriciated.

Thank You.


Labels (1)
2 Replies
Absent Member.
Absent Member.



I am Alejandra an OMi representative and I will help you on this,

Let'me search a little bit about this and I will get back to you.


Thanks and Best Regards

HP Support
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
Fleet Admiral Fleet Admiral
Fleet Admiral

Hello Kaka,


  • I would write
    private static Log s_log = LogFactory.getLog ("MyName in here");
    private static Log s_log2 = LogFactory.getLog(this.class.getName());
  • Logging is per default enabled only for error and fatal
    It can be configured (depending on the component):
    At the beginning change
    to loglevel=DEBUG
  • You can also redirect output to a file. Just use a file redirect as you would do it in e.g. java
    logfile = new File(directory, filename)
    logfile?.append("my message")


Kind regards,


The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.