#tracing #macos #ios #oslog #os-log


A layer for tracing that outputs to the oslog on macOS/iOS

3 releases

0.1.2 Oct 26, 2021
0.1.1 Sep 30, 2021
0.1.0 Sep 19, 2021

#102 in #ios

Download history 29/week @ 2022-06-02 3/week @ 2022-06-09 2/week @ 2022-06-16 4/week @ 2022-06-23 9/week @ 2022-06-30 15/week @ 2022-07-07 7/week @ 2022-07-14 15/week @ 2022-07-21 6/week @ 2022-07-28 7/week @ 2022-08-04 4/week @ 2022-08-11 34/week @ 2022-08-18 39/week @ 2022-08-25 2/week @ 2022-09-01 16/week @ 2022-09-08 7/week @ 2022-09-15

93 downloads per month

Zlib license

265 lines


This is a tracing layer for the Apple OS logging framework.

Activities are used to handle spans,


use tracing_oslog::OsLogger;

let collector = tracing_subscriber::registry()
	.with(OsLogger::new("moe.absolucy.test", "default"));
tracing::subscriber::set_global_default(collector).expect("failed to set global subscriber");

let number_of_yaks = 3;
// this creates a new event, outside of any spans.
info!(number_of_yaks, "preparing to shave yaks");

let number_shaved = yak_shave::shave_all(number_of_yaks);
	all_yaks_shaved = number_shaved == number_of_yaks,
	"yak shaving completed."


Copyright (c) 2021 Lucy lucy@absolucy.moe

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.

  2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.

  3. This notice may not be removed or altered from any source distribution.


~63K SLoC