Logging for ZayES

I was thinking of using logging with zayes for entity creation/destruction.

A few questions about this:

  1. this “entity system log” is somewhat unrelated to the “application log”, so I might want to enable the former without the latter or vice versa or both.
  2. java.util.logging has predefined severity levels, while I’d prefer having categories like CREATED and DESTROYED, and possibly subcategories for components
  3. anyone already attempted this?
    daydream) the awesome would be to have a viewer with a timeline where for any given time, you can see which component exist on the system… :slight_smile:

I would use categories for this.

I’d almost consider using something custom for this depending on why you want it… else if you are happy with the toString() versions of components then regular logging should work. But I’d think you’d want to at least be able to easily identity the entityID to which they are attached. And that feels like ‘custom data structure’ to me. But I guess a logging convention is no harder to parse than something like JSON.

1 Like

Got lots of these… what does it mean?

 2016-05-19 10:50:56,545 [jME3 Main] DEBUG base.DefaultEntitySet DefaultEntitySet - Pulling component type:class com.pesegato.es.component.Position for id:EntityId[0]
 2016-05-19 10:50:56,545 [jME3 Main] DEBUG base.DefaultEntitySet DefaultEntitySet - Entity EntityId[0] could not be completed for type:class com.pesegato.es.component.Position

It’s just debugging stuff.

As I recall, it’s telling you that something changed about a component that might make it a member of that EntitySet but it’s not because (in this case) it doesn’t have a Position.

Like, if you had an entity set watching ModelInfo and Position and you have entities with ModelInfo that keeps changing… but no Position. You will see debugging like this I think.


log4j.logger.com.simsilica=INFO, stdout


Yep, in general… for my stuff, only turn DEBUG on if you actually want to DEBUG what’s going on.

And for the really nitty-gritty some of my libs will have really verbose TRACE also.