How to keep kern.log out of syslog

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I'm working on Ubuntu 16.04.3 and I found that I could get the log of kernel from two places: /var/log/kern.log and /var/log/syslog. /var/log/syslog contains other logs but I could find /var/log/kern.log in it.



So it is possible to keep the kern.log out of the syslog? I mean I want to remove the kern.log from the syslog?



I've tried to remove the module(load="imklog") from the /etc/rsyslog.conf but this will remove all of kernel log from the kern.log and the syslog, whereas what I need is not to touch the kern.log, only to remove the kernel log from the syslog.










share|improve this question




























    0















    I'm working on Ubuntu 16.04.3 and I found that I could get the log of kernel from two places: /var/log/kern.log and /var/log/syslog. /var/log/syslog contains other logs but I could find /var/log/kern.log in it.



    So it is possible to keep the kern.log out of the syslog? I mean I want to remove the kern.log from the syslog?



    I've tried to remove the module(load="imklog") from the /etc/rsyslog.conf but this will remove all of kernel log from the kern.log and the syslog, whereas what I need is not to touch the kern.log, only to remove the kernel log from the syslog.










    share|improve this question
























      0












      0








      0


      1






      I'm working on Ubuntu 16.04.3 and I found that I could get the log of kernel from two places: /var/log/kern.log and /var/log/syslog. /var/log/syslog contains other logs but I could find /var/log/kern.log in it.



      So it is possible to keep the kern.log out of the syslog? I mean I want to remove the kern.log from the syslog?



      I've tried to remove the module(load="imklog") from the /etc/rsyslog.conf but this will remove all of kernel log from the kern.log and the syslog, whereas what I need is not to touch the kern.log, only to remove the kernel log from the syslog.










      share|improve this question














      I'm working on Ubuntu 16.04.3 and I found that I could get the log of kernel from two places: /var/log/kern.log and /var/log/syslog. /var/log/syslog contains other logs but I could find /var/log/kern.log in it.



      So it is possible to keep the kern.log out of the syslog? I mean I want to remove the kern.log from the syslog?



      I've tried to remove the module(load="imklog") from the /etc/rsyslog.conf but this will remove all of kernel log from the kern.log and the syslog, whereas what I need is not to touch the kern.log, only to remove the kernel log from the syslog.







      logs rsyslog syslog






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 15 at 7:46









      YvesYves

      944923




      944923




















          1 Answer
          1






          active

          oldest

          votes


















          0














          On Ubuntu 16.04, your rsyslog rules would be found in the /etc/rsyslog.d/50-default.conf file. Inside that file, you'll see the two following lines:



          *.*;auth,authpriv.none -/var/log/syslog
          kern.* -/var/log/kern.log


          You could skip the kernel messages from being logged to /var/log/syslog like so:



          *.*;auth,authpriv,kern.none -/var/log/syslog
          kern.* -/var/log/kern.log





          share|improve this answer























            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            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: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            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%2funix.stackexchange.com%2fquestions%2f506423%2fhow-to-keep-kern-log-out-of-syslog%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            On Ubuntu 16.04, your rsyslog rules would be found in the /etc/rsyslog.d/50-default.conf file. Inside that file, you'll see the two following lines:



            *.*;auth,authpriv.none -/var/log/syslog
            kern.* -/var/log/kern.log


            You could skip the kernel messages from being logged to /var/log/syslog like so:



            *.*;auth,authpriv,kern.none -/var/log/syslog
            kern.* -/var/log/kern.log





            share|improve this answer



























              0














              On Ubuntu 16.04, your rsyslog rules would be found in the /etc/rsyslog.d/50-default.conf file. Inside that file, you'll see the two following lines:



              *.*;auth,authpriv.none -/var/log/syslog
              kern.* -/var/log/kern.log


              You could skip the kernel messages from being logged to /var/log/syslog like so:



              *.*;auth,authpriv,kern.none -/var/log/syslog
              kern.* -/var/log/kern.log





              share|improve this answer

























                0












                0








                0







                On Ubuntu 16.04, your rsyslog rules would be found in the /etc/rsyslog.d/50-default.conf file. Inside that file, you'll see the two following lines:



                *.*;auth,authpriv.none -/var/log/syslog
                kern.* -/var/log/kern.log


                You could skip the kernel messages from being logged to /var/log/syslog like so:



                *.*;auth,authpriv,kern.none -/var/log/syslog
                kern.* -/var/log/kern.log





                share|improve this answer













                On Ubuntu 16.04, your rsyslog rules would be found in the /etc/rsyslog.d/50-default.conf file. Inside that file, you'll see the two following lines:



                *.*;auth,authpriv.none -/var/log/syslog
                kern.* -/var/log/kern.log


                You could skip the kernel messages from being logged to /var/log/syslog like so:



                *.*;auth,authpriv,kern.none -/var/log/syslog
                kern.* -/var/log/kern.log






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 15 at 8:59









                HaxielHaxiel

                3,62811021




                3,62811021



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Unix & Linux Stack Exchange!


                    • 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%2funix.stackexchange.com%2fquestions%2f506423%2fhow-to-keep-kern-log-out-of-syslog%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

                    Peggy Mitchell

                    Palaiologos

                    The Forum (Inglewood, California)