Hi

Am 17.05.2013 um 17:26 schrieb Ian Boston:

> Hi,
> Would be useful and make it possible to re-config with confidence remotely.
> 
> Why not just monitor sling/logs/error.log over ajax via a servlet after a
> config is submitted, ie lines matching a pattern since timestamp... until
> the user moves away from the page. That is almost what we do manually, have
> a look in error.log for anything suspicious.

Log file parsing is bound to fail: The log messages are neither standardized 
nor clear. It would be a constant battle to adapt the parse patterns.

Plus: what file do you want to parse ? logs/error.log happens to be the file in 
many cases, but this is not guaranteed.

> 
> Is it true that most services output log messages at error or warn in the
> event of a config problem, or does some other class/thread report problems ?

Not necessairily: The ConfigurationAdmin service logs ConfigurationExceptions 
thrown by ManagedService[Factory] services. Declarative Services Runtime logs a 
message if a component activation fails; but it cannot tell, whether that 
activation is related to configuration or not.

> 
> Would it work in a cluster ?

Probably not.

> 
> Presumably its rare not to have anything going to sling/logs/error.log ?

Yes, but how would you parse ? There is no spec on the log file message.

Regards
Felix

> 
> Ian
> 
> 
> On 17 May 2013 01:34, Bertrand Delacretaz <[email protected]> wrote:
> 
>> Hi,
>> 
>> Does anyone have an idea how we could provide feedback in the
>> webconsole when saving a configuration leads to errors?
>> 
>> Creating two loggers with the same category, for example, is invalid,
>> but the only feedback is ERROR messages in the logs, from the
>> webconsole UI you don't see anything wrong.
>> 
>> AFAIK applying saved configs is asynchronous, so it's not trivial -
>> we'd need the thread that saves them to send events when exceptions
>> are thrown, or log interceptors...sounds a bit complicated but having
>> that feedback would be valuable.
>> 
>> Thoughts?
>> 
>> -Bertrand
>> 

Reply via email to