Hi, Riak uses a logging library called lager that traps the output from SASL logging, so you should not need to set anything up.
You can either apply the lager parse transform to your commit hook code and then you should be able to use lager:error/2, lager:warning/2, lager:info/2 to write to the console.log (and others depending on the logging level). You can still access those logs without the parse transform using lager:log(info, self(), Fmt, Args). Good luck. On Tue, Sep 22, 2015 at 12:56 AM Kinson Chan 陳傑信 <kinsonc...@clustertech.com> wrote: > Hi, > > Recently, I am stuck with some commit hooks. I heard that SASL could give > more detailed debug information. However, when I specify "sasl = on" in > the /etc/riak/riak.conf, Riak becomes unable to start and generates some > error logs. What could be wrong? In case it makes a difference, I am > currently using CentOS 6.7 for this setup. Thanks. > > Regards, > Kinson > > # /etc/riak/riak.conf > (Some default and bitcask settings.) > erlang.distribution_buffer_size = 131072 > log.console.level = debug > sasl = on > > # /var/log/riak/console.log > 2015-09-22 14:41:28.564 [debug] <0.56.0>@lager_handler_watcher:94 Lager > installed handler {lager_file_backend,"/var/log/riak/error.log"} into > lager_event > 2015-09-22 14:41:28.564 [debug] <0.58.0>@lager_handler_watcher:94 Lager > installed handler error_logger_lager_h into error_logger > 2015-09-22 14:41:28.585 [debug] <0.43.0> Supervisor gr_param_sup started > gr_param:start_link(gr_lager_default_tracer_params) at pid <0.60.0> > 2015-09-22 14:41:28.585 [debug] <0.42.0> Supervisor gr_counter_sup started > gr_counter:start_link(gr_lager_default_tracer_counters) at pid <0.61.0> > 2015-09-22 14:41:28.586 [debug] <0.44.0> Supervisor gr_manager_sup started > gr_manager:start_link(gr_lager_default_tracer_params_mgr, > gr_lager_default_tracer_params, []) at pid <0.62.0> > 2015-09-22 14:41:28.586 [debug] <0.44.0> Supervisor gr_manager_sup started > gr_manager:start_link(gr_lager_default_tracer_counters_mgr, > gr_lager_default_tracer_counters, [{input,0},{filter,0},{output,0}]) at pid > <0.63.0> > 2015-09-22 14:41:28.777 [info] <0.7.0> Application lager started on node ' > riak@192.168.254.11' > 2015-09-22 14:41:28.779 [error] <0.66.0> CRASH REPORT Process <0.66.0> > with 0 neighbours exited with reason: > {bad_config,{sasl,{sasl_error_logger,true}}} in application_master:init/4 > line 133 > 2015-09-22 14:41:28.780 [info] <0.7.0> Application sasl exited with > reason: {bad_config,{sasl,{sasl_error_logger,true}}} > > # /var/log/riak/error.log > 2015-09-22 14:41:28.779 [error] <0.66.0> CRASH REPORT Process <0.66.0> > with 0 neighbours exited with reason: > {bad_config,{sasl,{sasl_error_logger,true}}} in application_master:init/4 > line 133 > > -- > Kinson Chan, PhD > Senior System Engineer > Direct Line: +852 2655 6113 Tel: +852 2655 6100 Email: > kinsonc...@clustertech.com > > ClusterTech Limited > Modernize Your Business with Advanced Computing Technologies > Cloud + High Performance Computing + Big Data + FPGA > Business Intelligence ∙ Financial Engineering ∙ Environmental Science ∙ > Smart City > > Website: www.clustertech.com/ Fax: +852 2994 2101 > Hong Kong Address: Units 211 - 213, Lakeside 1, No. 8 Science Park West > Ave., Science Park, N.T. Hong Kong > Hong Kong ∙ Beijing ∙ Shanghai ∙ Guangzhou ∙ Shenzhen ∙ Wuhan ∙ Xi'an ∙ > Sydney > > ********************************************************************************************************************** > The information contained in this e-mail and its attachments is > confidential and intended solely for the specified addressees. If you > have received this email in error, please do not read, copy, distribute, > disclose or use any information of this email in any way and please > immediately notify the sender and delete this email. Thank you for your > cooperation. > > ********************************************************************************************************************** > > > _______________________________________________ > riak-users mailing list > riak-users@lists.basho.com > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com >
_______________________________________________ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com