[lkml]   [2005]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: dumb question: How to create your own log files in a kernel module?
    Hi Xin,

    >I know printk can do this job. But what I really want is to print logs
    >to a file specified by me instead of /var/log/messages. And, the
    >messages irrelevant to my module should not be written into that file.
    > Now my log mixed with other logs in /var/log/message, which bother me
    >much. :(
    You seem to make a confusion here...

    Don't forget that files are only an abstraction for userspace. They are
    only meant to be read and written from userspace. Kernel code can never
    read or write files. In the case of /var/log/messages, this file is
    created by the syslogd program from the kernel buffer, not by the kernel

    You could just echo something specific to your driver in your printk
    strings, and grep this specific thing in /var/log/messages. You have
    your file!



    Michael Opdenacker
    +33 621 604 642

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-04-29 00:05    [W:0.019 / U:10.576 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site