Lager's "console_backend" not working

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Lager's "console_backend" not working

Frank Muller
Hi,

I’m using Lager in a basic Erlang app on Windows 7 (and even 10).

Whenever I activate the console backend, I get this warning message:
> WARNING: Lager's console backend is incompatible with the 'old' shell, not enabling it

Can someone explain me what does it mean and how I can fix it?

/Frank

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Lager's "console_backend" not working

Jakub Groncki
Hi,
It's always good to look at the code:

is_new_style_console_available() ->
    %% Criteria:
    %% 1. If the user has specified '-noshell' on the command line,
    %%    then we will pretend that the new-style console is available.
    %%    If there is no shell at all, then we don't have to worry
    %%    about log events being blocked by the old-style shell.
    %% 2. Windows doesn't support the new shell, so all windows users
    %%    have is the oldshell.
    %% 3. If the user_drv process is registered, all is OK.
    %%    'user_drv' is a registered proc name used by the "new"
    %%    console driver.

[...]

try {is_new_style_console_available(), lager_util:config_to_mask(Level)} of
        {false, _} ->
            Msg = "Lager's console backend is incompatible with the 'old' shell, not enabling it",

2017-04-10 22:19 GMT+02:00 Frank Muller <[hidden email]>:
Hi,

I’m using Lager in a basic Erlang app on Windows 7 (and even 10).

Whenever I activate the console backend, I get this warning message:
> WARNING: Lager's console backend is incompatible with the 'old' shell, not enabling it

Can someone explain me what does it mean and how I can fix it?

/Frank

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions



_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Lager's "console_backend" not working

Frank Muller
Hi Jakub

So because of 2 (I'm on windows), only old-shell is available and thus I can't get messages in the console :-/ ???

How people debug things in the console then?

/Frank

Hi,
It's always good to look at the code:

is_new_style_console_available() ->
    %% Criteria:
    %% 1. If the user has specified '-noshell' on the command line,
    %%    then we will pretend that the new-style console is available.
    %%    If there is no shell at all, then we don't have to worry
    %%    about log events being blocked by the old-style shell.
    %% 2. Windows doesn't support the new shell, so all windows users
    %%    have is the oldshell.
    %% 3. If the user_drv process is registered, all is OK.
    %%    'user_drv' is a registered proc name used by the "new"
    %%    console driver.

[...]

try {is_new_style_console_available(), lager_util:config_to_mask(Level)} of
        {false, _} ->
            Msg = "Lager's console backend is incompatible with the 'old' shell, not enabling it",

2017-04-10 22:19 GMT+02:00 Frank Muller <[hidden email]>:
Hi,

I’m using Lager in a basic Erlang app on Windows 7 (and even 10).

Whenever I activate the console backend, I get this warning message:
> WARNING: Lager's console backend is incompatible with the 'old' shell, not enabling it

Can someone explain me what does it mean and how I can fix it?

/Frank

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions



_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Lager's "console_backend" not working

Jakub Groncki
Hi,

Looks like it. Have you tried to run it with the file backend? That might work. This brief section explains it: https://github.com/basho/lager/blob/master/README.md#configuration

2017-04-11 5:27 GMT+02:00 Frank Muller <[hidden email]>:
Hi Jakub

So because of 2 (I'm on windows), only old-shell is available and thus I can't get messages in the console :-/ ???

How people debug things in the console then?

/Frank

Hi,
It's always good to look at the code:

is_new_style_console_available() ->
    %% Criteria:
    %% 1. If the user has specified '-noshell' on the command line,
    %%    then we will pretend that the new-style console is available.
    %%    If there is no shell at all, then we don't have to worry
    %%    about log events being blocked by the old-style shell.
    %% 2. Windows doesn't support the new shell, so all windows users
    %%    have is the oldshell.
    %% 3. If the user_drv process is registered, all is OK.
    %%    'user_drv' is a registered proc name used by the "new"
    %%    console driver.

[...]

try {is_new_style_console_available(), lager_util:config_to_mask(Level)} of
        {false, _} ->
            Msg = "Lager's console backend is incompatible with the 'old' shell, not enabling it",

2017-04-10 22:19 GMT+02:00 Frank Muller <[hidden email]>:
Hi,

I’m using Lager in a basic Erlang app on Windows 7 (and even 10).

Whenever I activate the console backend, I get this warning message:
> WARNING: Lager's console backend is incompatible with the 'old' shell, not enabling it

Can someone explain me what does it mean and how I can fix it?

/Frank

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions




_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Lager's "console_backend" not working

Max Lapshin-2
I usually change this place in lager code and use output not reading these important warnings.

It is windows, anything here can hang.

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Loading...