1

I have a gemfire function which is ment to be deployed in a gemfire cluster. What is the way to write log from function, so that it goes to server log file.

My gemfire version is 8.2.0

Greg Chase
  • 173
  • 8

2 Answers2

1

You should use either the LogService.getLogger(String) or LogService.getLogger() method to get a Logger instance. The latter is a convenience method and sets the name of the returned Logger to the name of the calling class. The Logger returned by these methods is a log4j Logger.

Jens D
  • 4,229
  • 3
  • 16
  • 19
0

I actually figured it out. From Gemfire 8.1.0 the log library they use has changed and it now uses Apache Log4j2. Logs done through this logger goes to the server log file.