-module(example). -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). -export([main/0]). -file("src/example.gleam", 7). -spec main() -> nil. main() -> glight:configure([console, {file, <<"server.log"/utf8>>}]), glight:set_log_level(debug), glight:set_is_color(true), glight:set_json_time_key(<<"ts"/utf8>>), glight:set_json_msg_key(<<"message"/utf8>>), glight:set_json_level_key(<<"lvl"/utf8>>), _pipe = glight:logger(), _pipe@1 = glight:with(_pipe, <<"key"/utf8>>, <<"value"/utf8>>), _pipe@2 = glight:with( _pipe@1, <<"one"/utf8>>, <<"two, buckle my shoe"/utf8>> ), _pipe@3 = glight:with( _pipe@2, <<"three"/utf8>>, <<"four close the door"/utf8>> ), glight:debug(_pipe@3, <<"hello debug"/utf8>>), _pipe@4 = glight:logger(), _pipe@5 = glight:with( _pipe@4, <<"it's catchy"/utf8>>, <<"you like it"/utf8>> ), glight:info(_pipe@5, <<"this is the hook."/utf8>>), _pipe@6 = glight:logger(), _pipe@7 = glight:with( _pipe@6, <<"it's catchy"/utf8>>, <<"you like it"/utf8>> ), glight:notice(_pipe@7, <<"this is the hook."/utf8>>), _pipe@8 = glight:logger(), _pipe@9 = glight:with( _pipe@8, <<"it's catchy"/utf8>>, <<"you like it"/utf8>> ), glight:warning(_pipe@9, <<"this is the hook."/utf8>>), _pipe@10 = glight:logger(), _pipe@11 = glight:with( _pipe@10, <<"it's catchy"/utf8>>, <<"you like it"/utf8>> ), glight:error(_pipe@11, <<"this is the hook."/utf8>>), _pipe@12 = glight:logger(), _pipe@13 = glight:with( _pipe@12, <<"it's catchy"/utf8>>, <<"you like it"/utf8>> ), glight:critical(_pipe@13, <<"this is the hook."/utf8>>), _pipe@14 = glight:logger(), _pipe@15 = glight:with( _pipe@14, <<"it's catchy"/utf8>>, <<"you like it"/utf8>> ), glight:alert(_pipe@15, <<"this is the hook."/utf8>>), _pipe@16 = glight:logger(), _pipe@17 = glight:with( _pipe@16, <<"it's catchy"/utf8>>, <<"you like it"/utf8>> ), glight:emergency(_pipe@17, <<"this is the hook."/utf8>>), logging:log(debug, <<"we can also log from the logging moduel"/utf8>>), logging:log( info, <<"anything that uses erlang logger gets our tasty config"/utf8>> ), gleam_erlang_ffi:sleep(100).