| PLEX86 | ||
|
Differece between printf and printk 4954Differece between printf and printk 4955 Aragorn Yes, but offers 64 GBytes to whom? Not individual applications, since they can address but about 4 GBytes. Not directly to the kernel, either, since it can access only about 4 GBytes... On 5 Oct 2005 07:17:12 -0700, kevin staggered into the Black Sun and said: Um. I don't know exactly what you're asking here. printk() is there for kernel code to deliver info to the kernel's ring buffer, with 8 different logging levels from KERNEMERG (insanely serious problem) to KERNDEBUG (supposed to be used when you're debugging your code.) You see printk() used like so: printk(KERNINFO "Initializing USB Mbutt Storage driver...-n"); ...which sends that line of text to the ring buffer with level 6, KERNINFO. printk() writes to the ring buffer. Your system logger (metalog or syslog or syslog-ng or several other loggers) reads the ring buffer. Your logger can redirect messages to files according to the level of the message, the exact text of the message, or all kinds of things. Read the man page for your logger and the man page for its config file to determine how you can redirect messages to various files or directories. Use the system log facilities; that's what they're there for. Making printk() write to a file is not a very good idea when a relatively simple way of doing what you want is already present. HTH, -- Matt GThere is no Darkness in Eternity-But only Light too dim for us to see Brainbench MVP for Linux Admin mail: TRAP + SPAN don't belong ----------------------------- penguins, is Tux." --MegaHAL
|
||||
Differece between printf and printk 4955 Linux groups from Newsgroups The #1 Usenet Provider on the Internet
|
||||