From owner-freebsd-drivers@FreeBSD.ORG Tue Oct 18 01:25:28 2005 Return-Path: X-Original-To: freebsd-drivers@freebsd.org Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 06E7816A41F for ; Tue, 18 Oct 2005 01:25:28 +0000 (GMT) (envelope-from bharmaji@gmail.com) Received: from qproxy.gmail.com (qproxy.gmail.com [72.14.204.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8F48843D46 for ; Tue, 18 Oct 2005 01:25:27 +0000 (GMT) (envelope-from bharmaji@gmail.com) Received: by qproxy.gmail.com with SMTP id a39so916893qbd for ; Mon, 17 Oct 2005 18:25:26 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=NrJHHTdIrzwWG/hvDCEQCblPj86HrbGIUPjuMm7GDGsksTx6PMy6YHdUXf6Xq3vH0Z8MtwkRw3wN4gpV4QKL8dza27TZ2xb/ebtAMrjQzFU/acGzjegRIsQt9NTbcW1wTr7wGOl0R6kOkvaPyE6/eLlBiWD1W3FeFI+QAsrW520= Received: by 10.65.81.2 with SMTP id i2mr2548931qbl; Mon, 17 Oct 2005 18:25:26 -0700 (PDT) Received: by 10.65.132.10 with HTTP; Mon, 17 Oct 2005 18:25:26 -0700 (PDT) Message-ID: <67beabb0510171825q1e124bf6v2adbe0c9f235a6ae@mail.gmail.com> Date: Mon, 17 Oct 2005 18:25:26 -0700 From: Bharma Ji To: freebsd-drivers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Recommended ways to log driver operations X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2005 01:25:28 -0000 Hi I recently wrote a driver for a chip. I am wondering if there are any standard recommended ways of logging the driver operations. I have used printf in the driver and I look at it using dmesg so far. Am wondering if i= t is possible to create a driver specific log file so that it is easy to debug. Also, if the driver emits copious output then the log buffer will overflow and some messages may be truncated. Writing to a specific log file may help in that case. However, I have no idea if this is worth investigating. Any suggestions appreciated