Date: Tue, 20 Dec 2016 06:05:42 +0900 (JST) From: Hiroki Sato <hrs@FreeBSD.org> To: domagoj.stolfa@gmail.com, adrian.chadd@gmail.com Cc: freebsd-arch@freebsd.org Subject: Re: RFC: DTrace probes for debugging or testing in userland programs Message-ID: <20161220.060542.16356944875657261.hrs@allbsd.org> In-Reply-To: <20161219204719.GE65993@freebsd-laptop> References: <20161220.043646.1181938468712455328.hrs@allbsd.org> <CAJ-Vmon3%2BjMyfgBcVORyMoXX3JEAFCWtK2VPo9wWLN2hsS%2BrNA@mail.gmail.com> <20161219204719.GE65993@freebsd-laptop>
next in thread | previous in thread | raw e-mail | index | archive | help
----Security_Multipart(Tue_Dec_20_06_05_42_2016_527)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Domagoj Stolfa <domagoj.stolfa@gmail.com> wrote in <20161219204719.GE65993@freebsd-laptop>: do> Hello, do> do> > I'd love to see a unified-ish logging API for FreeBSD applications. I do> > always end up reusing some C code I have here that I based on some do> > Squid style logging API in ages past. I could always polish it up and do> > put it up for review. do> > do> > I'm not a big fan of requiring dtrace to use it though. On a lot of do> > the embedded systems dtrace varies from "it's very big" through to "we do> > don't have enough RAM/flash to do this". do> do> DTrace indeed is very heavyweight, this could be an opt-in kind of thing do> compile time, hidden somewhere in the logging system employed. do> Personally, I think that keeping the diffs in the actual daemons to the do> bare minimum(1-2 LoC) should be one of the priorities. Additionally, the do> logging system should by default be lightweight, with compile time do> options to change the actual logging method(a simple log, DTrace, ...). do> do> > So although I like the sentiment, I don't think using dtrace for do> > program logging is the right answer. I like what apple did to wrap do> > the program logging stuff so people didn't just write their own do> > libraries (hi!) and so there's a unified-ish way to interact with do> > apple programs. I think we could do with that. do> do> This sounds like a pretty clean solution, and the logging method could do> be hid somewhere deep in there. I would personally like to see an option do> where I could pick DTrace for logging, as it allows for some interesting do> scripts to be written, however I tend to agree that this should not be do> the default. To be clear: my proposal is to replace only debug logging (i.e. for developers), not the other logging in general, as the subject line says. Although I agree that DTrace is not lightweight, I think impact of just adding tracing probes is small. -- Hiroki ----Security_Multipart(Tue_Dec_20_06_05_42_2016_527)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEABECAAYFAlhYS6YACgkQTyzT2CeTzy3KLgCfXsd4GL/nxJKYODu14ZVjwnZ4 HwMAn1jx2MUxDq24hN0jJRoGOPu2j/3o =ducG -----END PGP SIGNATURE----- ----Security_Multipart(Tue_Dec_20_06_05_42_2016_527)----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20161220.060542.16356944875657261.hrs>