Re: Query about /var/log/messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 1, 2009 at 3:37 PM, Leonidas . <leonidas137@xxxxxxxxx> wrote:
> On Thu, Oct 1, 2009 at 2:45 PM, Leonidas . <leonidas137@xxxxxxxxx> wrote:
>> Hi List,
>>
>> Kernel maintains a circular log buffer and output of printk is stored
>> in that log buffer,
>> this log buffer survives reboots also.
>>
>> Is it possible to create a seperate file or dir inside /var/log for
>> logging only my kernel
>> modules messages?
>>
>> On my machine I see many files and dir inside /var/log/. Is it doable
>> from a module?
>>
>> -Leo.
>>
>
> E.g. I know that I can change syslog.conf file so that all kernel
> messages are stored in
> a separate file.
>
> But is there any way I can store only msgs emanating from My_Module to
> a separate file?
> Assume that all msgs from My_Module are having same priority say KERN_INFO.
>
> -Leo.
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>

I dont know the answer for the question that you have asked but you
can always put your printks with a definite pre-text like "My_Module"
and later you can grep on /var/log/messages for this string. If this
is not what you wanted then may be somebody else can help you.

-Vinit

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux