Log For Service

Hi All,

There is a requirement to create a custom log file whenever I execute the SFTP service for any partner. The custom log will have all the activity of the sFTP process.

Can anybody guide me how to create a custom log file at service level.

Please help…

Sasanka

Refer to the log4J logging Documentation. Use the jar file provided by Apache and then write Java services to log (INFO,ERROR,DEBUG etc levels) the messages. Use the log4j config file to configure the write path (can be a file or a database).

[url]http://logging.apache.org/log4j/1.2/apidocs/index.html[/url]
[url]http://logging.apache.org/log4j/1.2/download.html[/url]

Cheers,
Akshith

Hi all,

Sorry for follow up this old thread.
I have the same requirement. I’m trying to create custom log using log4j.
I tried to create a java service then use log4j as my application logging.
But I can’t import “org.apache.log4j.*” in my service.
I’ve already copy log4j.jar in packages\logging\code\jars
and log4j.properties in pub folder.

am I missing something?

thanks in advanced.

what error you are getting ? Please share more details.

Thanks,

Hi,

Thanks for your reply.

My problem is I can’t import log4j in my java service.
this Issue is resolved.
solution :
I try to copy log4j.jar in packages\logging\code\jars
and build my package, and it works.

Now, I’m trying to use Mark’s logging package.
Write a log4j log message according to level severity and write message by invoking pub.flow.debuglog.

My question is :
how can I write the log message in mycostum.log not in server.log ?
please help.

Thanks.

Hi , Pls find blow thread.

thanks for your reply Frank,

My problem is resolved.
I tried to configure filename in log4j.properties. and it works for me.

@Junedi

I’m trying to find this “Mark’s log4j” package. I’m aware that it was available in the wmusers, but I’m having a hard time to find it in the TechCommunity site.
Can you share me the ink to download it?

Regards,

… uh. never mind. Just found.
It happened I oversaw the pages I found so far. I was so focused on the word “log4j” that I missed the “loggings.zip” (http://techcommunity.softwareag.com/ecosystem/communities/public/webmethods/products/bpm_suite/codesamples/59bf91a8-b1d3-11e4-8d00-cd8d7ef22065/).