mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Randy.Dunlap" <rddunlap@osdl.org>
To: vimpagliazzo@libero.it
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: multiple printk problem
Date: Fri, 28 May 2004 19:38:55 -0700	[thread overview]
Message-ID: <20040528193855.27231ea1.rddunlap@osdl.org> (raw)
In-Reply-To: <20040528165600.1971fdc0.rddunlap@osdl.org>


| Hi, I'm quite new to kernel module programming,
| I was wondering why multiple consecutive calls to printk will not be 
| correctly logged by the system logger (linux-2.4.25 with metalog without 
| buffering in my case).
| 
| Consider for example the following example, only the first message can 
| be found in logs:
| 
|     #include <linux/version.h>
|     #include <linux/init.h>
|     #include <linux/module.h>
|     #include <linux/kernel.h>
| 
| 
|     MODULE_AUTHOR ("Vito Impagliazzo <vimpagliazzo@libero.it>");
|     MODULE_DESCRIPTION ("Hello World");
|     MODULE_LICENSE("Dual BSD/GPL");
| 
|     static int hello_init(void)
|     {
|         printf(KERN_ALERT "1\n");
|         printf(KERN_ALERT "2\n");
|         printf(KERN_ALERT "3\n");
|         return 0;
|     }
| 
|     static void hello_exit(void)
|     {
|         printk(KERN_ALERT "Goodbye, cruel world\n");
|     }
| 
| module_init(hello_init);
| module_exit(hello_exit);

Hi,

Your module works fine if you change "printf" to "printk".

If you still fail to see all 3 messages, it's a metalog
problem and not a kernel problem.
You should be able to contact them at
	http://sourceforge.net/projects/metalog/

--
~Randy

       reply	other threads:[~2004-05-29  2:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20040528165600.1971fdc0.rddunlap@osdl.org>
2004-05-29  2:38 ` Randy.Dunlap [this message]
2004-02-19 10:11 Vito Impagliazzo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040528193855.27231ea1.rddunlap@osdl.org \
    --to=rddunlap@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vimpagliazzo@libero.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®