These are chat archives for petabridge/akka-bootcamp

16th
Feb 2017
Franky Ostyn
@FOstyn
Feb 16 2017 14:41
Hi all,
how could I overwrite any value from my HOCON config file ?
I would like to change the loglevel in code to another value. akka
{
loggers = ["Akka.Logger.NLog.NLogLogger, Akka.Logger.NLog"]
        loglevel = DEBUG

        actor
        {
Nick Chamberlain
@heynickc
Feb 16 2017 16:09
@FOstyn you mean at runtime? might want to take a look at Akka.Configuration.ConfigurationFactory
Nick Chamberlain
@heynickc
Feb 16 2017 17:13
@webafriq_twitter sorry to chime in late, but the purpose of snapshotting is more for the performance of a Recover query. When you update an object, you are always appending another event to the journal with your Persist action, i.e. "append-only" storage. You are able to get the current state of an object by replaying all events (create, update, update, update, etc) from history for the object. If you have a lot of events, it might have performance implications because you have to retrieve all of them. Therefore, a SaveSnapshot call will consolidate previous events up until that point, creating a new journal entry that represents the object's state at that point so you don't have to query back so far when you Recover the object.
Franky Ostyn
@FOstyn
Feb 16 2017 18:09
@heynickc indeed, at runtime. With .ConfigurationFactory or Context.System.Settings.Config, the problem is the same: all Config properties are readonly. Optional I can do it with NLog (LogManager.Configuration.FindTargetByName()). Setting in HOCON the loglevel=DEBUG and changing the rule in NLog works, but I thought I was also possible in Akka...