Package org.nustaq.kontraktor.util
Class Log
- All Implemented Interfaces:
Serializable,Executor,Monitorable
Created by ruedi on 24.08.14.
A wrapper for logging + metrics. This logger facade is asynchronous (so does not block by IO).
In order to redirect logging, use Log.Lg.setLogWrapper( .. );
Note its possible to log to a remote host using kontraktor remoting as the core logging class
is an actor.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.nustaq.kontraktor.Actor
Actor.ActorReport -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic Logstatic final intFields inherited from class org.nustaq.kontraktor.Actor
__cbQueue, __clientConnection, __connections, __currentDispatcher, __mailbox, __mailboxCapacity, __mbCapacity, __publishTarget, __remoteId, __scheduler, __self, __stopped, __ticketMachine, connection, sender, userData, zzRoutingGCEnabled, zzServerMsgCallbackFields inherited from class org.nustaq.kontraktor.Actors
CONT, DEFAULT_TIMOUT, defaultScheduler, delayedCalls, exec, instance, MAX_EXTERNAL_THREADS_POOL_SIZE, version -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidstatic voidstatic voidstatic voidvoidvoidstatic voidstatic voidstatic voidintvoidstatic voidstatic voidstatic voidvoidvoidvoidprotected Logself()use this to call public methods using actor-dispatch instead of direct in-thread call.static intsetLevel(int level) Sets the logging level to the specified value.voidsetLogWrapper(Log.LogWrapper delegate) voidsetSeverity(int severity) static voidvoidstatic voidstatic voidstatic voidvoidMethods inherited from class org.nustaq.kontraktor.Actor
__addDeadLetter, __addRemoteConnection, __addStopHandler, __dispatchRemoteCall, __enqueueCall, __getCachedMethod, __removeRemoteConnection, __stop, __stopImpl, __submit, ask, askMsg, asyncstop, checkThread, close, closeCurrentClient, current, cyclic, debounce, delayed, execInThreadPool, execute, getActor, getActorRef, getCallbackSize, getConnections, getCurrentDispatcher, getFactory, getMailboxSize, getQSizes, getReport, getScheduler, getSubMonitorables, getUntypedRef, hasStopped, inside, inThread, isCallbackQPressured, isEmpty, isMailboxPressured, isProxy, isPublished, isRemote, isStopped, ping, router$clientPing, serialOn, setServerMsgCallback, stop, stopSafeClose, tell, tellMsg, unpublish, zzkrouterLostClient, zzRoutingRefGCMethods inherited from class org.nustaq.kontraktor.Actors
AddDeadLetter, all, all, all, allMapped, AsActor, AsActor, AsActor, AsActor, AsUntypedActor, awaitAll, awaitAll, awaitAll, awaitAll, complete, complete, DeadLetters, flow, InThread, isComplete, isCont, isError, isErrorOrComplete, isResult, isTimeout, kYield, kYield, promise, race, race, reject, resolve, resolve, stream, SubmitDelayed, yieldCallbacks
-
Field Details
-
DEBUG
public static final int DEBUG- See Also:
-
INFO
public static final int INFO- See Also:
-
WARN
public static final int WARN- See Also:
-
ERROR
public static final int ERROR- See Also:
-
Lg
-
defaultLogger
-
-
Constructor Details
-
Log
public Log()
-
-
Method Details
-
SetSynchronous
public static void SetSynchronous() -
setLevel
public static int setLevel(int level) Sets the logging level to the specified value.- Parameters:
level- = Log.DEBUG | Log.INFO | Log.WARN | Log.ERROR- Returns:
- the previously set severity
-
Info
-
Info
-
Debug
-
Debug
-
Debug
-
Info
-
Warn
-
Warn
-
Warn
-
Error
-
Error
-
Error
-
setLogWrapper
-
setSeverity
public void setSeverity(int severity) -
self
Description copied from class:Actoruse this to call public methods using actor-dispatch instead of direct in-thread call. Important: When passing references out of your actor, always pass 'self()' instead of this ! -
getSeverity
public int getSeverity() -
resetToSysout
public void resetToSysout() -
infoLong
-
debug
-
debugLong
-
info
-
warnLong
-
warn
-
error
-
msg
-