Interface ISagaLoggerWithContext

All Known Implementing Classes:
SagaLoggerWithContext

public interface ISagaLoggerWithContext

ISagaLoggerWithContext is the main interface for logging in Saga SDK with a pre defined context. It is expected that logging takes place through concrete implementations of this interface.

Typical usage pattern:

 import com.persequor.extension.logging.ISagaLogger;
 import com.persequor.extension.logging.LoggingCategory;
 import com.persequor.extension.logging.LoggingContext;
 import com.persequor.extension.logging.LoggingMessage;

 public class LoggingExampleController {
        private ISagaLoggerWithContext logger = sagaLoggerFactory.get(getClass(), LoggingContext.CORE);

        public void helloWithCustomLoggingContext() {
                // this logging will override LoggingContext provided when getting an instance of ISagaLogger from the factory
                logger.info(LoggingCategory.SYSTEM, LoggingMessage.get("hello from custom context"), LoggingMessage.get("our Recomendation"));
    }
 }