syslog not showing log levels in messages












10















Here is sample output of my syslog messages in /var/log/syslog:



Nov 15 20:20:48 ubuntu winbindd[915]: [2011/11/15 20:20:48.940063,  0] winbindd/idmap_tdb.c:287(idmap_tdb_open_db)
Nov 15 20:20:48 ubuntu winbindd[915]: Upgrade of IDMAP_VERSION from -1 to 2 is not possible with incomplete configuration


How do I see what was the level of message, like info, warn, error etc.?



I am using Ubuntu 10.04 LTS with rsyslog package version 5.8.1-1ubuntu2.










share|improve this question





























    10















    Here is sample output of my syslog messages in /var/log/syslog:



    Nov 15 20:20:48 ubuntu winbindd[915]: [2011/11/15 20:20:48.940063,  0] winbindd/idmap_tdb.c:287(idmap_tdb_open_db)
    Nov 15 20:20:48 ubuntu winbindd[915]: Upgrade of IDMAP_VERSION from -1 to 2 is not possible with incomplete configuration


    How do I see what was the level of message, like info, warn, error etc.?



    I am using Ubuntu 10.04 LTS with rsyslog package version 5.8.1-1ubuntu2.










    share|improve this question



























      10












      10








      10


      5






      Here is sample output of my syslog messages in /var/log/syslog:



      Nov 15 20:20:48 ubuntu winbindd[915]: [2011/11/15 20:20:48.940063,  0] winbindd/idmap_tdb.c:287(idmap_tdb_open_db)
      Nov 15 20:20:48 ubuntu winbindd[915]: Upgrade of IDMAP_VERSION from -1 to 2 is not possible with incomplete configuration


      How do I see what was the level of message, like info, warn, error etc.?



      I am using Ubuntu 10.04 LTS with rsyslog package version 5.8.1-1ubuntu2.










      share|improve this question
















      Here is sample output of my syslog messages in /var/log/syslog:



      Nov 15 20:20:48 ubuntu winbindd[915]: [2011/11/15 20:20:48.940063,  0] winbindd/idmap_tdb.c:287(idmap_tdb_open_db)
      Nov 15 20:20:48 ubuntu winbindd[915]: Upgrade of IDMAP_VERSION from -1 to 2 is not possible with incomplete configuration


      How do I see what was the level of message, like info, warn, error etc.?



      I am using Ubuntu 10.04 LTS with rsyslog package version 5.8.1-1ubuntu2.







      log logging rsyslog






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 16 '11 at 8:26









      enzotib

      64.7k7136155




      64.7k7136155










      asked Nov 16 '11 at 1:44









      user837208user837208

      175116




      175116






















          2 Answers
          2






          active

          oldest

          votes


















          17














          That is the default traditional format.



          To output log levels in messages (technically known as priorities), you should change the default template used by rsyslog:





          1. open with admin privileges the file /etc/rsyslog.conf and add the following lines



            $template precise,"%syslogpriority%,%syslogfacility%,%timegenerated%,%HOSTNAME%,%syslogtag%,%msg%n"
            $ActionFileDefaultTemplate precise


            after the line



            $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat



          2. restart the daemon, with the command:



            sudo service rsyslog restart



          Now you should see lines like the following:



          6,5,Nov 18 10:17:02,acer,rsyslogd:, [origin software="rsyslogd" swVersion="5.8.1" x-pid="7064" x-info="http://www.rsyslog.com"] exiting on signal 15.


          where the first two numbers (6 and 5) represent respectively the priority and the facility, where the priority is given by



          7 - debug
          6 - info
          5 - notice
          4 - warning, warn
          3 - err, error
          2 - crit,
          1 - alert,
          0 - emerg, panic


          and the facilities can be seen in the syslog(3) man page.






          share|improve this answer



















          • 1





            More about formats in rsyslog docs: rsyslog.com/doc/rsyslog_conf_examples.html and rsyslog.com/doc/rsyslog_conf_templates.html

            – Taha Jahangir
            Jan 4 '14 at 16:16



















          0














          what about Debain 9. I applied the same commands but it didn't work






          share|improve this answer










          New contributor




          user936826 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.
















          • 2





            if you tried the same thing on a different system I would suggest that you post a new question saying what the problem is and provide a link to this post say that you have tried the answers here and then note your results. Also, since this is for a different system this post may be better suited for a different StackExchange site such as unix stackexchange

            – Jeff
            1 hour ago











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "89"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f79684%2fsyslog-not-showing-log-levels-in-messages%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          17














          That is the default traditional format.



          To output log levels in messages (technically known as priorities), you should change the default template used by rsyslog:





          1. open with admin privileges the file /etc/rsyslog.conf and add the following lines



            $template precise,"%syslogpriority%,%syslogfacility%,%timegenerated%,%HOSTNAME%,%syslogtag%,%msg%n"
            $ActionFileDefaultTemplate precise


            after the line



            $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat



          2. restart the daemon, with the command:



            sudo service rsyslog restart



          Now you should see lines like the following:



          6,5,Nov 18 10:17:02,acer,rsyslogd:, [origin software="rsyslogd" swVersion="5.8.1" x-pid="7064" x-info="http://www.rsyslog.com"] exiting on signal 15.


          where the first two numbers (6 and 5) represent respectively the priority and the facility, where the priority is given by



          7 - debug
          6 - info
          5 - notice
          4 - warning, warn
          3 - err, error
          2 - crit,
          1 - alert,
          0 - emerg, panic


          and the facilities can be seen in the syslog(3) man page.






          share|improve this answer



















          • 1





            More about formats in rsyslog docs: rsyslog.com/doc/rsyslog_conf_examples.html and rsyslog.com/doc/rsyslog_conf_templates.html

            – Taha Jahangir
            Jan 4 '14 at 16:16
















          17














          That is the default traditional format.



          To output log levels in messages (technically known as priorities), you should change the default template used by rsyslog:





          1. open with admin privileges the file /etc/rsyslog.conf and add the following lines



            $template precise,"%syslogpriority%,%syslogfacility%,%timegenerated%,%HOSTNAME%,%syslogtag%,%msg%n"
            $ActionFileDefaultTemplate precise


            after the line



            $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat



          2. restart the daemon, with the command:



            sudo service rsyslog restart



          Now you should see lines like the following:



          6,5,Nov 18 10:17:02,acer,rsyslogd:, [origin software="rsyslogd" swVersion="5.8.1" x-pid="7064" x-info="http://www.rsyslog.com"] exiting on signal 15.


          where the first two numbers (6 and 5) represent respectively the priority and the facility, where the priority is given by



          7 - debug
          6 - info
          5 - notice
          4 - warning, warn
          3 - err, error
          2 - crit,
          1 - alert,
          0 - emerg, panic


          and the facilities can be seen in the syslog(3) man page.






          share|improve this answer



















          • 1





            More about formats in rsyslog docs: rsyslog.com/doc/rsyslog_conf_examples.html and rsyslog.com/doc/rsyslog_conf_templates.html

            – Taha Jahangir
            Jan 4 '14 at 16:16














          17












          17








          17







          That is the default traditional format.



          To output log levels in messages (technically known as priorities), you should change the default template used by rsyslog:





          1. open with admin privileges the file /etc/rsyslog.conf and add the following lines



            $template precise,"%syslogpriority%,%syslogfacility%,%timegenerated%,%HOSTNAME%,%syslogtag%,%msg%n"
            $ActionFileDefaultTemplate precise


            after the line



            $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat



          2. restart the daemon, with the command:



            sudo service rsyslog restart



          Now you should see lines like the following:



          6,5,Nov 18 10:17:02,acer,rsyslogd:, [origin software="rsyslogd" swVersion="5.8.1" x-pid="7064" x-info="http://www.rsyslog.com"] exiting on signal 15.


          where the first two numbers (6 and 5) represent respectively the priority and the facility, where the priority is given by



          7 - debug
          6 - info
          5 - notice
          4 - warning, warn
          3 - err, error
          2 - crit,
          1 - alert,
          0 - emerg, panic


          and the facilities can be seen in the syslog(3) man page.






          share|improve this answer













          That is the default traditional format.



          To output log levels in messages (technically known as priorities), you should change the default template used by rsyslog:





          1. open with admin privileges the file /etc/rsyslog.conf and add the following lines



            $template precise,"%syslogpriority%,%syslogfacility%,%timegenerated%,%HOSTNAME%,%syslogtag%,%msg%n"
            $ActionFileDefaultTemplate precise


            after the line



            $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat



          2. restart the daemon, with the command:



            sudo service rsyslog restart



          Now you should see lines like the following:



          6,5,Nov 18 10:17:02,acer,rsyslogd:, [origin software="rsyslogd" swVersion="5.8.1" x-pid="7064" x-info="http://www.rsyslog.com"] exiting on signal 15.


          where the first two numbers (6 and 5) represent respectively the priority and the facility, where the priority is given by



          7 - debug
          6 - info
          5 - notice
          4 - warning, warn
          3 - err, error
          2 - crit,
          1 - alert,
          0 - emerg, panic


          and the facilities can be seen in the syslog(3) man page.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 18 '11 at 9:27









          enzotibenzotib

          64.7k7136155




          64.7k7136155








          • 1





            More about formats in rsyslog docs: rsyslog.com/doc/rsyslog_conf_examples.html and rsyslog.com/doc/rsyslog_conf_templates.html

            – Taha Jahangir
            Jan 4 '14 at 16:16














          • 1





            More about formats in rsyslog docs: rsyslog.com/doc/rsyslog_conf_examples.html and rsyslog.com/doc/rsyslog_conf_templates.html

            – Taha Jahangir
            Jan 4 '14 at 16:16








          1




          1





          More about formats in rsyslog docs: rsyslog.com/doc/rsyslog_conf_examples.html and rsyslog.com/doc/rsyslog_conf_templates.html

          – Taha Jahangir
          Jan 4 '14 at 16:16





          More about formats in rsyslog docs: rsyslog.com/doc/rsyslog_conf_examples.html and rsyslog.com/doc/rsyslog_conf_templates.html

          – Taha Jahangir
          Jan 4 '14 at 16:16













          0














          what about Debain 9. I applied the same commands but it didn't work






          share|improve this answer










          New contributor




          user936826 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.
















          • 2





            if you tried the same thing on a different system I would suggest that you post a new question saying what the problem is and provide a link to this post say that you have tried the answers here and then note your results. Also, since this is for a different system this post may be better suited for a different StackExchange site such as unix stackexchange

            – Jeff
            1 hour ago
















          0














          what about Debain 9. I applied the same commands but it didn't work






          share|improve this answer










          New contributor




          user936826 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.
















          • 2





            if you tried the same thing on a different system I would suggest that you post a new question saying what the problem is and provide a link to this post say that you have tried the answers here and then note your results. Also, since this is for a different system this post may be better suited for a different StackExchange site such as unix stackexchange

            – Jeff
            1 hour ago














          0












          0








          0







          what about Debain 9. I applied the same commands but it didn't work






          share|improve this answer










          New contributor




          user936826 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.










          what about Debain 9. I applied the same commands but it didn't work







          share|improve this answer










          New contributor




          user936826 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.









          share|improve this answer



          share|improve this answer








          edited 1 hour ago





















          New contributor




          user936826 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.









          answered 2 hours ago









          user936826user936826

          11




          11




          New contributor




          user936826 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.





          New contributor





          user936826 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.






          user936826 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.








          • 2





            if you tried the same thing on a different system I would suggest that you post a new question saying what the problem is and provide a link to this post say that you have tried the answers here and then note your results. Also, since this is for a different system this post may be better suited for a different StackExchange site such as unix stackexchange

            – Jeff
            1 hour ago














          • 2





            if you tried the same thing on a different system I would suggest that you post a new question saying what the problem is and provide a link to this post say that you have tried the answers here and then note your results. Also, since this is for a different system this post may be better suited for a different StackExchange site such as unix stackexchange

            – Jeff
            1 hour ago








          2




          2





          if you tried the same thing on a different system I would suggest that you post a new question saying what the problem is and provide a link to this post say that you have tried the answers here and then note your results. Also, since this is for a different system this post may be better suited for a different StackExchange site such as unix stackexchange

          – Jeff
          1 hour ago





          if you tried the same thing on a different system I would suggest that you post a new question saying what the problem is and provide a link to this post say that you have tried the answers here and then note your results. Also, since this is for a different system this post may be better suited for a different StackExchange site such as unix stackexchange

          – Jeff
          1 hour ago


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Ask Ubuntu!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f79684%2fsyslog-not-showing-log-levels-in-messages%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          GameSpot

          日野市

          Tu-95轟炸機