Index: kernel/arch/amd64/src/interrupt.c
===================================================================
--- kernel/arch/amd64/src/interrupt.c	(revision 927cd9ce784b0e6c27b4862e22e7019f1b721585)
+++ kernel/arch/amd64/src/interrupt.c	(revision b2fa1204c76e1eaec329888181d281aac04ed61e)
@@ -35,4 +35,5 @@
 #include <arch/interrupt.h>
 #include <print.h>
+#include <log.h>
 #include <debug.h>
 #include <panic.h>
@@ -66,16 +67,16 @@
 void istate_decode(istate_t *istate)
 {
-	printf("cs =%0#18" PRIx64 "\trip=%0#18" PRIx64 "\t"
+	log_printf("cs =%0#18" PRIx64 "\trip=%0#18" PRIx64 "\t"
 	    "rfl=%0#18" PRIx64 "\terr=%0#18" PRIx64 "\n",
 	    istate->cs, istate->rip, istate->rflags, istate->error_word);
 	
 	if (istate_from_uspace(istate))
-		printf("ss =%0#18" PRIx64 "\n", istate->ss);
-	
-	printf("rax=%0#18" PRIx64 "\trbx=%0#18" PRIx64 "\t"
+		log_printf("ss =%0#18" PRIx64 "\n", istate->ss);
+	
+	log_printf("rax=%0#18" PRIx64 "\trbx=%0#18" PRIx64 "\t"
 	    "rcx=%0#18" PRIx64 "\trdx=%0#18" PRIx64 "\n",
 	    istate->rax, istate->rbx, istate->rcx, istate->rdx);
 	
-	printf("rsi=%0#18" PRIx64 "\trdi=%0#18" PRIx64 "\t"
+	log_printf("rsi=%0#18" PRIx64 "\trdi=%0#18" PRIx64 "\t"
 	    "rbp=%0#18" PRIx64 "\trsp=%0#18" PRIx64 "\n",
 	    istate->rsi, istate->rdi, istate->rbp,
@@ -83,9 +84,9 @@
 	    (uintptr_t) &istate->rsp);
 	
-	printf("r8 =%0#18" PRIx64 "\tr9 =%0#18" PRIx64 "\t"
+	log_printf("r8 =%0#18" PRIx64 "\tr9 =%0#18" PRIx64 "\t"
 	    "r10=%0#18" PRIx64 "\tr11=%0#18" PRIx64 "\n",
 	    istate->r8, istate->r9, istate->r10, istate->r11);
 	
-	printf("r12=%0#18" PRIx64 "\tr13=%0#18" PRIx64 "\t"
+	log_printf("r12=%0#18" PRIx64 "\tr13=%0#18" PRIx64 "\t"
 	    "r14=%0#18" PRIx64 "\tr15=%0#18" PRIx64 "\n",
 	    istate->r12, istate->r13, istate->r14, istate->r15);
@@ -193,5 +194,6 @@
 		 */
 #ifdef CONFIG_DEBUG
-		printf("cpu%u: spurious interrupt (inum=%u)\n", CPU->id, inum);
+		log(LF_ARCH, LVL_DEBUG, "cpu%u: spurious interrupt (inum=%u)",
+		    CPU->id, inum);
 #endif
 	}
Index: kernel/arch/arm32/src/mach/gta02/gta02.c
===================================================================
--- kernel/arch/arm32/src/mach/gta02/gta02.c	(revision 927cd9ce784b0e6c27b4862e22e7019f1b721585)
+++ kernel/arch/arm32/src/mach/gta02/gta02.c	(revision b2fa1204c76e1eaec329888181d281aac04ed61e)
@@ -49,4 +49,5 @@
 #include <ddi/ddi.h>
 #include <ddi/device.h>
+#include <log.h>
 
 #define GTA02_MEMORY_START	0x30000000	/* physical */
@@ -149,5 +150,5 @@
 	} else {
 		/* Spurious interrupt.*/
-		printf("cpu%d: spurious interrupt (inum=%d)\n",
+		log(LF_ARCH, LVL_DEBUG, "cpu%d: spurious interrupt (inum=%d)",
 		    CPU->id, inum);
 	}
Index: kernel/arch/arm32/src/mach/integratorcp/integratorcp.c
===================================================================
--- kernel/arch/arm32/src/mach/integratorcp/integratorcp.c	(revision 927cd9ce784b0e6c27b4862e22e7019f1b721585)
+++ kernel/arch/arm32/src/mach/integratorcp/integratorcp.c	(revision b2fa1204c76e1eaec329888181d281aac04ed61e)
@@ -43,5 +43,4 @@
 #include <console/console.h>
 #include <sysinfo/sysinfo.h>
-#include <print.h>
 #include <ddi/device.h>
 #include <mm/page.h>
@@ -53,5 +52,6 @@
 #include <abi/fb/visuals.h>
 #include <ddi/ddi.h>
-#include <print.h>
+#include <log.h>
+
 
 
@@ -275,5 +275,6 @@
 			} else {
 				/* Spurious interrupt.*/
-				printf("cpu%d: spurious interrupt (inum=%d)\n",
+				log(LF_ARCH, LVL_DEBUG,
+				    "cpu%d: spurious interrupt (inum=%d)",
 				    CPU->id, i);
 			}
Index: kernel/arch/ia32/src/drivers/i8259.c
===================================================================
--- kernel/arch/ia32/src/drivers/i8259.c	(revision 927cd9ce784b0e6c27b4862e22e7019f1b721585)
+++ kernel/arch/ia32/src/drivers/i8259.c	(revision b2fa1204c76e1eaec329888181d281aac04ed61e)
@@ -42,5 +42,5 @@
 #include <arch/asm.h>
 #include <arch.h>
-#include <print.h>
+#include <log.h>
 #include <interrupt.h>
 
@@ -129,5 +129,5 @@
 {
 #ifdef CONFIG_DEBUG
-	printf("cpu%u: PIC spurious interrupt\n", CPU->id);
+	log(LF_ARCH, LVL_DEBUG, "cpu%u: PIC spurious interrupt", CPU->id);
 #endif
 }
Index: kernel/arch/ia32/src/smp/apic.c
===================================================================
--- kernel/arch/ia32/src/smp/apic.c	(revision 927cd9ce784b0e6c27b4862e22e7019f1b721585)
+++ kernel/arch/ia32/src/smp/apic.c	(revision b2fa1204c76e1eaec329888181d281aac04ed61e)
@@ -42,5 +42,5 @@
 #include <interrupt.h>
 #include <arch/interrupt.h>
-#include <print.h>
+#include <log.h>
 #include <arch/asm.h>
 #include <arch.h>
@@ -135,5 +135,5 @@
 {
 #ifdef CONFIG_DEBUG
-	printf("cpu%u: APIC spurious interrupt\n", CPU->id);
+	log(LF_ARCH, LVL_DEBUG, "cpu%u: APIC spurious interrupt", CPU->id);
 #endif
 }
@@ -241,18 +241,23 @@
 	esr.value = l_apic[ESR];
 	
-	if (esr.send_checksum_error)
-		printf("Send Checksum Error\n");
-	if (esr.receive_checksum_error)
-		printf("Receive Checksum Error\n");
-	if (esr.send_accept_error)
-		printf("Send Accept Error\n");
-	if (esr.receive_accept_error)
-		printf("Receive Accept Error\n");
-	if (esr.send_illegal_vector)
-		printf("Send Illegal Vector\n");
-	if (esr.received_illegal_vector)
-		printf("Received Illegal Vector\n");
-	if (esr.illegal_register_address)
-		printf("Illegal Register Address\n");
+	if (esr.err_bitmap) {
+		log_begin(LF_ARCH, LVL_ERROR);
+		log_printf("APIC errors detected:");
+		if (esr.send_checksum_error)
+			log_printf("\nSend Checksum Error");
+		if (esr.receive_checksum_error)
+			log_printf("\nReceive Checksum Error");
+		if (esr.send_accept_error)
+			log_printf("\nSend Accept Error");
+		if (esr.receive_accept_error)
+			log_printf("\nReceive Accept Error");
+		if (esr.send_illegal_vector)
+			log_printf("\nSend Illegal Vector");
+		if (esr.received_illegal_vector)
+			log_printf("\nReceived Illegal Vector");
+		if (esr.illegal_register_address)
+			log_printf("\nIllegal Register Address");
+		log_end();
+	}
 	
 	return !esr.err_bitmap;
@@ -270,5 +275,5 @@
 			retries = 0;
 #ifdef CONFIG_DEBUG
-			printf("IPI is pending.\n");
+			log(LF_ARCH, LVL_DEBUG, "IPI is pending.");
 #endif
 			delay(20);
@@ -489,10 +494,11 @@
 {
 #ifdef LAPIC_VERBOSE
-	printf("LVT on cpu%u, LAPIC ID: %" PRIu8 "\n",
+	log_begin(LF_ARCH, LVL_DEBUG);
+	log_printf("LVT on cpu%u, LAPIC ID: %" PRIu8 "\n",
 	    CPU->id, l_apic_id());
 	
 	lvt_tm_t tm;
 	tm.value = l_apic[LVT_Tm];
-	printf("LVT Tm: vector=%" PRIu8 ", %s, %s, %s\n",
+	log_printf("LVT Tm: vector=%" PRIu8 ", %s, %s, %s\n",
 	    tm.vector, delivs_str[tm.delivs], mask_str[tm.masked],
 	    tm_mode_str[tm.mode]);
@@ -500,5 +506,5 @@
 	lvt_lint_t lint;
 	lint.value = l_apic[LVT_LINT0];
-	printf("LVT LINT0: vector=%" PRIu8 ", %s, %s, %s, irr=%u, %s, %s\n",
+	log_printf("LVT LINT0: vector=%" PRIu8 ", %s, %s, %s, irr=%u, %s, %s\n",
 	    tm.vector, delmod_str[lint.delmod], delivs_str[lint.delivs],
 	    intpol_str[lint.intpol], lint.irr, trigmod_str[lint.trigger_mode],
@@ -506,5 +512,5 @@
 	
 	lint.value = l_apic[LVT_LINT1];
-	printf("LVT LINT1: vector=%" PRIu8 ", %s, %s, %s, irr=%u, %s, %s\n",
+	log_printf("LVT LINT1: vector=%" PRIu8 ", %s, %s, %s, irr=%u, %s, %s\n",
 	    tm.vector, delmod_str[lint.delmod], delivs_str[lint.delivs],
 	    intpol_str[lint.intpol], lint.irr, trigmod_str[lint.trigger_mode],
@@ -513,6 +519,7 @@
 	lvt_error_t error;
 	error.value = l_apic[LVT_Err];
-	printf("LVT Err: vector=%" PRIu8 ", %s, %s\n", error.vector,
+	log_printf("LVT Err: vector=%" PRIu8 ", %s, %s\n", error.vector,
 	    delivs_str[error.delivs], mask_str[error.masked]);
+	log_end();
 #endif
 }
Index: kernel/arch/ia32/src/smp/mps.c
===================================================================
--- kernel/arch/ia32/src/smp/mps.c	(revision 927cd9ce784b0e6c27b4862e22e7019f1b721585)
+++ kernel/arch/ia32/src/smp/mps.c	(revision b2fa1204c76e1eaec329888181d281aac04ed61e)
@@ -36,5 +36,5 @@
 
 #include <config.h>
-#include <print.h>
+#include <log.h>
 #include <debug.h>
 #include <arch/smp/mps.h>
@@ -181,5 +181,5 @@
 	buf[6] = 0;
 	
-	printf("MPS: bus=%" PRIu8 " (%s)\n", bus->bus_id, buf);
+	log(LF_ARCH, LVL_DEBUG, "MPS: bus=%" PRIu8 " (%s)", bus->bus_id, buf);
 #endif
 }
@@ -205,58 +205,60 @@
 {
 #ifdef MPSCT_VERBOSE
-	printf("MPS: ");
+	log_begin(LF_ARCH, LVL_DEBUG);
+	log_printf("MPS: ");
 	
 	switch (iointr->intr_type) {
 	case 0:
-		printf("INT");
-		break;
-	case 1:
-		printf("NMI");
-		break;
-	case 2:
-		printf("SMI");
-		break;
-	case 3:
-		printf("ExtINT");
-		break;
-	}
-	
-	printf(", ");
+		log_printf("INT");
+		break;
+	case 1:
+		log_printf("NMI");
+		break;
+	case 2:
+		log_printf("SMI");
+		break;
+	case 3:
+		log_printf("ExtINT");
+		break;
+	}
+	
+	log_printf(", ");
 	
 	switch (iointr->poel & 3) {
 	case 0:
-		printf("bus-like");
-		break;
-	case 1:
-		printf("active high");
-		break;
-	case 2:
-		printf("reserved");
-		break;
-	case 3:
-		printf("active low");
-		break;
-	}
-	
-	printf(", ");
+		log_printf("bus-like");
+		break;
+	case 1:
+		log_printf("active high");
+		break;
+	case 2:
+		log_printf("reserved");
+		break;
+	case 3:
+		log_printf("active low");
+		break;
+	}
+	
+	log_printf(", ");
 	
 	switch ((iointr->poel >> 2) & 3) {
 	case 0:
-		printf("bus-like");
-		break;
-	case 1:
-		printf("edge-triggered");
-		break;
-	case 2:
-		printf("reserved");
-		break;
-	case 3:
-		printf("level-triggered");
-		break;
-	}
-	
-	printf(", bus=%" PRIu8 " irq=%" PRIu8 " io_apic=%" PRIu8" pin=%"
-	    PRIu8 "\n", iointr->src_bus_id, iointr->src_bus_irq,
+		log_printf("bus-like");
+		break;
+	case 1:
+		log_printf("edge-triggered");
+		break;
+	case 2:
+		log_printf("reserved");
+		break;
+	case 3:
+		log_printf("level-triggered");
+		break;
+	}
+	
+	log_printf(", bus=%" PRIu8 " irq=%" PRIu8 " io_apic=%" PRIu8" pin=%"
+	    PRIu8, iointr->src_bus_id, iointr->src_bus_irq,
 	    iointr->dst_io_apic_id, iointr->dst_io_apic_pin);
+	log_end();
 #endif
 }
@@ -266,58 +268,60 @@
 {
 #ifdef MPSCT_VERBOSE
-	printf("MPS: ");
+	log_begin(LF_ARCH, LVL_DEBUG);
+	log_printf("MPS: ");
 	
 	switch (lintr->intr_type) {
 	case 0:
-		printf("INT");
-		break;
-	case 1:
-		printf("NMI");
-		break;
-	case 2:
-		printf("SMI");
-		break;
-	case 3:
-		printf("ExtINT");
-		break;
-	}
-	
-	printf(", ");
+		log_printf("INT");
+		break;
+	case 1:
+		log_printf("NMI");
+		break;
+	case 2:
+		log_printf("SMI");
+		break;
+	case 3:
+		log_printf("ExtINT");
+		break;
+	}
+	
+	log_printf(", ");
 	
 	switch (lintr->poel & 3) {
 	case 0:
-		printf("bus-like");
-		break;
-	case 1:
-		printf("active high");
-		break;
-	case 2:
-		printf("reserved");
-		break;
-	case 3:
-		printf("active low");
-		break;
-	}
-	
-	printf(", ");
+		log_printf("bus-like");
+		break;
+	case 1:
+		log_printf("active high");
+		break;
+	case 2:
+		log_printf("reserved");
+		break;
+	case 3:
+		log_printf("active low");
+		break;
+	}
+	
+	log_printf(", ");
 	
 	switch ((lintr->poel >> 2) & 3) {
 	case 0:
-		printf("bus-like");
-		break;
-	case 1:
-		printf("edge-triggered");
-		break;
-	case 2:
-		printf("reserved");
-		break;
-	case 3:
-		printf("level-triggered");
-		break;
-	}
-	
-	printf(", bus=%" PRIu8 " irq=%" PRIu8 " l_apic=%" PRIu8" pin=%"
-	    PRIu8 "\n", lintr->src_bus_id, lintr->src_bus_irq,
+		log_printf("bus-like");
+		break;
+	case 1:
+		log_printf("edge-triggered");
+		break;
+	case 2:
+		log_printf("reserved");
+		break;
+	case 3:
+		log_printf("level-triggered");
+		break;
+	}
+	
+	log_printf(", bus=%" PRIu8 " irq=%" PRIu8 " l_apic=%" PRIu8" pin=%"
+	    PRIu8, lintr->src_bus_id, lintr->src_bus_irq,
 	    lintr->dst_l_apic_id, lintr->dst_l_apic_pin);
+	log_end();
 #endif
 }
@@ -332,6 +336,7 @@
 		switch (cur[CT_EXT_ENTRY_TYPE]) {
 		default:
-			printf("MPS: Skipping MP Configuration Table extended "
-			    "entry type %" PRIu8 "\n", cur[CT_EXT_ENTRY_TYPE]);
+			log(LF_ARCH, LVL_NOTE, "MPS: Skipping MP Configuration"
+			    " Table extended entry type %" PRIu8,
+			    cur[CT_EXT_ENTRY_TYPE]);
 		}
 	}
@@ -341,15 +346,15 @@
 {
 	if (ct->signature != CT_SIGNATURE) {
-		printf("MPS: Wrong ct->signature\n");
+		log(LF_ARCH, LVL_WARN, "MPS: Wrong ct->signature");
 		return;
 	}
 	
 	if (!mps_ct_check()) {
-		printf("MPS: Wrong ct checksum\n");
+		log(LF_ARCH, LVL_WARN, "MPS: Wrong ct checksum");
 		return;
 	}
 	
 	if (ct->oem_table) {
-		printf("MPS: ct->oem_table not supported\n");
+		log(LF_ARCH, LVL_WARN, "MPS: ct->oem_table not supported");
 		return;
 	}
@@ -402,5 +407,5 @@
 			 * Something is wrong. Fallback to UP mode.
 			 */
-			printf("MPS: ct badness %" PRIu8 "\n", *cur);
+			log(LF_ARCH, LVL_WARN, "MPS: ct badness %" PRIu8, *cur);
 			return;
 		}
@@ -418,5 +423,5 @@
 	 * Not yet implemented.
 	 */
-	printf("MPS: Default configuration not supported\n");
+	log(LF_ARCH, LVL_WARN, "MPS: Default configuration not supported");
 }
 
@@ -449,9 +454,9 @@
 	
 fs_found:
-	printf("%p: MPS Floating Pointer Structure\n", fs);
+	log(LF_ARCH, LVL_NOTE, "%p: MPS Floating Pointer Structure", fs);
 	
 	if ((fs->config_type == 0) && (fs->configuration_table)) {
 		if (fs->mpfib2 >> 7) {
-			printf("MPS: PIC mode not supported\n");
+			log(LF_ARCH, LVL_WARN, "MPS: PIC mode not supported\n");
 			return;
 		}
Index: kernel/arch/ia32/src/smp/smp.c
===================================================================
--- kernel/arch/ia32/src/smp/smp.c	(revision 927cd9ce784b0e6c27b4862e22e7019f1b721585)
+++ kernel/arch/ia32/src/smp/smp.c	(revision b2fa1204c76e1eaec329888181d281aac04ed61e)
@@ -52,5 +52,5 @@
 #include <mm/slab.h>
 #include <mm/as.h>
-#include <print.h>
+#include <log.h>
 #include <memstr.h>
 #include <arch/drivers/i8259.h>
@@ -129,6 +129,6 @@
 		
 		if (ops->cpu_apic_id(i) == bsp_l_apic) {
-			printf("kmp: bad processor entry #%u, will not send IPI "
-			    "to myself\n", i);
+			log(LF_ARCH, LVL_ERROR, "kmp: bad processor entry #%u, "
+			    "will not send IPI to myself", i);
 			continue;
 		}
@@ -162,10 +162,10 @@
 			if (waitq_sleep_timeout(&ap_completion_wq, 1000000,
 			    SYNCH_FLAGS_NONE) == ESYNCH_TIMEOUT) {
-				printf("%s: waiting for cpu%u (APIC ID = %d) "
-				    "timed out\n", __FUNCTION__, i,
-				    ops->cpu_apic_id(i));
+				log(LF_ARCH, LVL_NOTE, "%s: waiting for cpu%u "
+				    "(APIC ID = %d) timed out", __FUNCTION__,
+				    i, ops->cpu_apic_id(i));
 			}
 		} else
-			printf("INIT IPI for l_apic%d failed\n",
+			log(LF_ARCH, LVL_ERROR, "INIT IPI for l_apic%d failed",
 			    ops->cpu_apic_id(i));
 	}
Index: kernel/arch/mips32/src/debugger.c
===================================================================
--- kernel/arch/mips32/src/debugger.c	(revision 927cd9ce784b0e6c27b4862e22e7019f1b721585)
+++ kernel/arch/mips32/src/debugger.c	(revision b2fa1204c76e1eaec329888181d281aac04ed61e)
@@ -39,4 +39,5 @@
 #include <console/cmd.h>
 #include <print.h>
+#include <log.h>
 #include <panic.h>
 #include <arch.h>
@@ -294,17 +295,21 @@
 	cmd_initialize(&bkpts_info);
 	if (!cmd_register(&bkpts_info))
-		printf("Cannot register command %s\n", bkpts_info.name);
+		log(LF_OTHER, LVL_WARN, "Cannot register command %s",
+		    bkpts_info.name);
 	
 	cmd_initialize(&delbkpt_info);
 	if (!cmd_register(&delbkpt_info))
-		printf("Cannot register command %s\n", delbkpt_info.name);
+		log(LF_OTHER, LVL_WARN, "Cannot register command %s",
+		    delbkpt_info.name);
 	
 	cmd_initialize(&addbkpt_info);
 	if (!cmd_register(&addbkpt_info))
-		printf("Cannot register command %s\n", addbkpt_info.name);
+		log(LF_OTHER, LVL_WARN, "Cannot register command %s",
+		    addbkpt_info.name);
 	
 	cmd_initialize(&addbkpte_info);
 	if (!cmd_register(&addbkpte_info))
-		printf("Cannot register command %s\n", addbkpte_info.name);
+		log(LF_OTHER, LVL_WARN, "Cannot register command %s",
+		    addbkpte_info.name);
 #endif /* CONFIG_KCONSOLE */
 }
Index: kernel/arch/mips32/src/exception.c
===================================================================
--- kernel/arch/mips32/src/exception.c	(revision 927cd9ce784b0e6c27b4862e22e7019f1b721585)
+++ kernel/arch/mips32/src/exception.c	(revision b2fa1204c76e1eaec329888181d281aac04ed61e)
@@ -48,4 +48,5 @@
 #include <arch/debugger.h>
 #include <symtab.h>
+#include <log.h>
 
 static const char *exctable[] = {
@@ -74,37 +75,37 @@
 void istate_decode(istate_t *istate)
 {
-	printf("epc=%#010" PRIx32 "\tsta=%#010" PRIx32 "\t"
+	log_printf("epc=%#010" PRIx32 "\tsta=%#010" PRIx32 "\t"
 	    "lo =%#010" PRIx32 "\thi =%#010" PRIx32 "\n",
 	    istate->epc, istate->status, istate->lo, istate->hi);
 	
-	printf("a0 =%#010" PRIx32 "\ta1 =%#010" PRIx32 "\t"
+	log_printf("a0 =%#010" PRIx32 "\ta1 =%#010" PRIx32 "\t"
 	    "a2 =%#010" PRIx32 "\ta3 =%#010" PRIx32 "\n",
 	    istate->a0, istate->a1, istate->a2, istate->a3);
 	
-	printf("t0 =%#010" PRIx32 "\tt1 =%#010" PRIx32 "\t"
+	log_printf("t0 =%#010" PRIx32 "\tt1 =%#010" PRIx32 "\t"
 	    "t2 =%#010" PRIx32 "\tt3 =%#010" PRIx32 "\n",
 	    istate->t0, istate->t1, istate->t2, istate->t3);
 	
-	printf("t4 =%#010" PRIx32 "\tt5 =%#010" PRIx32 "\t"
+	log_printf("t4 =%#010" PRIx32 "\tt5 =%#010" PRIx32 "\t"
 	    "t6 =%#010" PRIx32 "\tt7 =%#010" PRIx32 "\n",
 	    istate->t4, istate->t5, istate->t6, istate->t7);
 	
-	printf("t8 =%#010" PRIx32 "\tt9 =%#010" PRIx32 "\t"
+	log_printf("t8 =%#010" PRIx32 "\tt9 =%#010" PRIx32 "\t"
 	    "v0 =%#010" PRIx32 "\tv1 =%#010" PRIx32 "\n",
 	    istate->t8, istate->t9, istate->v0, istate->v1);
 	
-	printf("s0 =%#010" PRIx32 "\ts1 =%#010" PRIx32 "\t"
+	log_printf("s0 =%#010" PRIx32 "\ts1 =%#010" PRIx32 "\t"
 	    "s2 =%#010" PRIx32 "\ts3 =%#010" PRIx32 "\n",
 	    istate->s0, istate->s1, istate->s2, istate->s3);
 	
-	printf("s4 =%#010" PRIx32 "\ts5 =%#010" PRIx32 "\t"
+	log_printf("s4 =%#010" PRIx32 "\ts5 =%#010" PRIx32 "\t"
 	    "s6 =%#010" PRIx32 "\ts7 =%#010" PRIx32 "\n",
 	    istate->s4, istate->s5, istate->s6, istate->s7);
 	
-	printf("s8 =%#010" PRIx32 "\tat =%#010" PRIx32 "\t"
+	log_printf("s8 =%#010" PRIx32 "\tat =%#010" PRIx32 "\t"
 	    "kt0=%#010" PRIx32 "\tkt1=%#010" PRIx32 "\n",
 	    istate->s8, istate->at, istate->kt0, istate->kt1);
 	
-	printf("sp =%#010" PRIx32 "\tra =%#010" PRIx32 "\t"
+	log_printf("sp =%#010" PRIx32 "\tra =%#010" PRIx32 "\t"
 	    "gp =%#010" PRIx32 "\n",
 	    istate->sp, istate->ra, istate->gp);
@@ -194,5 +195,6 @@
 				 */
 #ifdef CONFIG_DEBUG
-				printf("cpu%u: spurious interrupt (inum=%u)\n",
+				log(LF_ARCH, LVL_DEBUG,
+				    "cpu%u: spurious interrupt (inum=%u)",
 				    CPU->id, i);
 #endif
Index: kernel/arch/mips32/src/mm/tlb.c
===================================================================
--- kernel/arch/mips32/src/mm/tlb.c	(revision 927cd9ce784b0e6c27b4862e22e7019f1b721585)
+++ kernel/arch/mips32/src/mm/tlb.c	(revision b2fa1204c76e1eaec329888181d281aac04ed61e)
@@ -43,4 +43,5 @@
 #include <synch/mutex.h>
 #include <print.h>
+#include <log.h>
 #include <debug.h>
 #include <align.h>
@@ -217,5 +218,5 @@
 	 */
 	if (index.p) {
-		printf("%s: TLBP failed in exception handler (badvaddr=%#"
+		log(LF_ARCH, LVL_WARN, "%s: TLBP failed in exception handler (badvaddr=%#"
 		    PRIxn ", ASID=%d).\n", __func__, badvaddr,
 		    AS ? AS->asid : -1);
Index: kernel/arch/ppc32/src/interrupt.c
===================================================================
--- kernel/arch/ppc32/src/interrupt.c	(revision 927cd9ce784b0e6c27b4862e22e7019f1b721585)
+++ kernel/arch/ppc32/src/interrupt.c	(revision b2fa1204c76e1eaec329888181d281aac04ed61e)
@@ -44,4 +44,5 @@
 #include <arch/mm/pht.h>
 #include <print.h>
+#include <log.h>
 
 void start_decrementer(void)
@@ -55,44 +56,44 @@
 void istate_decode(istate_t *istate)
 {
-	printf("r0 =%0#10" PRIx32 "\tr1 =%0#10" PRIx32 "\t"
+	log_printf("r0 =%0#10" PRIx32 "\tr1 =%0#10" PRIx32 "\t"
 	    "r2 =%0#10" PRIx32 "\n", istate->r0, istate->sp, istate->r2);
 	
-	printf("r3 =%0#10" PRIx32 "\tr4 =%0#10" PRIx32 "\t"
+	log_printf("r3 =%0#10" PRIx32 "\tr4 =%0#10" PRIx32 "\t"
 	    "r5 =%0#10" PRIx32 "\n", istate->r3, istate->r4, istate->r5);
 	
-	printf("r6 =%0#10" PRIx32 "\tr7 =%0#10" PRIx32 "\t"
+	log_printf("r6 =%0#10" PRIx32 "\tr7 =%0#10" PRIx32 "\t"
 	    "r8 =%0#10" PRIx32 "\n", istate->r6, istate->r7, istate->r8);
 	
-	printf("r9 =%0#10" PRIx32 "\tr10=%0#10" PRIx32 "\t"
+	log_printf("r9 =%0#10" PRIx32 "\tr10=%0#10" PRIx32 "\t"
 	    "r11=%0#10" PRIx32 "\n", istate->r9, istate->r10, istate->r11);
 	
-	printf("r12=%0#10" PRIx32 "\tr13=%0#10" PRIx32 "\t"
+	log_printf("r12=%0#10" PRIx32 "\tr13=%0#10" PRIx32 "\t"
 	    "r14=%0#10" PRIx32 "\n", istate->r12, istate->r13, istate->r14);
 	
-	printf("r15=%0#10" PRIx32 "\tr16=%0#10" PRIx32 "\t"
+	log_printf("r15=%0#10" PRIx32 "\tr16=%0#10" PRIx32 "\t"
 	    "r17=%0#10" PRIx32 "\n", istate->r15, istate->r16, istate->r17);
 	
-	printf("r18=%0#10" PRIx32 "\tr19=%0#10" PRIx32 "\t"
+	log_printf("r18=%0#10" PRIx32 "\tr19=%0#10" PRIx32 "\t"
 	    "r20=%0#10" PRIx32 "\n", istate->r18, istate->r19, istate->r20);
 	
-	printf("r21=%0#10" PRIx32 "\tr22=%0#10" PRIx32 "\t"
+	log_printf("r21=%0#10" PRIx32 "\tr22=%0#10" PRIx32 "\t"
 	    "r23=%0#10" PRIx32 "\n", istate->r21, istate->r22, istate->r23);
 	
-	printf("r24=%0#10" PRIx32 "\tr25=%0#10" PRIx32 "\t"
+	log_printf("r24=%0#10" PRIx32 "\tr25=%0#10" PRIx32 "\t"
 	    "r26=%0#10" PRIx32 "\n", istate->r24, istate->r25, istate->r26);
 	
-	printf("r27=%0#10" PRIx32 "\tr28=%0#10" PRIx32 "\t"
+	log_printf("r27=%0#10" PRIx32 "\tr28=%0#10" PRIx32 "\t"
 	    "r29=%0#10" PRIx32 "\n", istate->r27, istate->r28, istate->r29);
 	
-	printf("r30=%0#10" PRIx32 "\tr31=%0#10" PRIx32 "\n",
+	log_printf("r30=%0#10" PRIx32 "\tr31=%0#10" PRIx32 "\n",
 	    istate->r30, istate->r31);
 	
-	printf("cr =%0#10" PRIx32 "\tpc =%0#10" PRIx32 "\t"
+	log_printf("cr =%0#10" PRIx32 "\tpc =%0#10" PRIx32 "\t"
 	    "lr =%0#10" PRIx32 "\n", istate->cr, istate->pc, istate->lr);
 	
-	printf("ctr=%0#10" PRIx32 "\txer=%0#10" PRIx32 "\t"
+	log_printf("ctr=%0#10" PRIx32 "\txer=%0#10" PRIx32 "\t"
 	    "dar=%0#10" PRIx32 "\n", istate->ctr, istate->xer, istate->dar);
 	
-	printf("srr1=%0#10" PRIx32 "\n", istate->srr1);
+	log_printf("srr1=%0#10" PRIx32 "\n", istate->srr1);
 }
 
@@ -130,6 +131,6 @@
 			 */
 #ifdef CONFIG_DEBUG
-			printf("cpu%u: spurious interrupt (inum=%" PRIu8 ")\n",
-			    CPU->id, inum);
+			log(LF_ARCH, LVL_DEBUG, "cpu%u: spurious interrupt"
+			    " (inum=%" PRIu8 ")", CPU->id, inum);
 #endif
 		}
Index: kernel/arch/sparc64/src/drivers/kbd.c
===================================================================
--- kernel/arch/sparc64/src/drivers/kbd.c	(revision 927cd9ce784b0e6c27b4862e22e7019f1b721585)
+++ kernel/arch/sparc64/src/drivers/kbd.c	(revision b2fa1204c76e1eaec329888181d281aac04ed61e)
@@ -44,5 +44,5 @@
 #include <align.h>
 #include <str.h>
-#include <print.h>
+#include <log.h>
 #include <sysinfo/sysinfo.h>
 
@@ -71,5 +71,6 @@
 	ofw_tree_property_t *prop = ofw_tree_getprop(node, "interrupts");
 	if ((!prop) || (!prop->value)) {
-		printf("ns16550: Unable to find interrupts property\n");
+		log(LF_ARCH, LVL_ERROR,
+		    "ns16550: Unable to find interrupts property");
 		return false;
 	}
@@ -82,5 +83,6 @@
 	prop = ofw_tree_getprop(node, "reg");
 	if ((!prop) || (!prop->value)) {
-		printf("ns16550: Unable to find reg property\n");
+		log(LF_ARCH, LVL_ERROR,
+		    "ns16550: Unable to find reg property");
 		return false;
 	}
@@ -91,5 +93,6 @@
 	if (!ofw_ebus_apply_ranges(node->parent,
 	    ((ofw_ebus_reg_t *) prop->value), &pa)) {
-		printf("ns16550: Failed to determine address\n");
+		log(LF_ARCH, LVL_ERROR,
+		    "ns16550: Failed to determine address");
 		return false;
 	}
@@ -101,5 +104,6 @@
 	    ((ofw_ebus_reg_t *) prop->value), interrupts, &inr, &cir,
 	    &cir_arg)) {
-		printf("ns16550: Failed to determine interrupt\n");
+		log(LF_ARCH, LVL_ERROR,
+		    "ns16550: Failed to determine interrupt");
 		return false;
 	}
@@ -117,5 +121,6 @@
 	    PAGE_WRITE | PAGE_NOT_CACHEABLE) + offset);
 	
-	ns16550_instance_t *ns16550_instance = ns16550_init(ns16550, inr, cir, cir_arg);
+	ns16550_instance_t *ns16550_instance = ns16550_init(ns16550, inr, cir,
+	    cir_arg, NULL);
 	if (ns16550_instance) {
 		kbrd_instance_t *kbrd_instance = kbrd_init();
Index: kernel/arch/sparc64/src/drivers/pci.c
===================================================================
--- kernel/arch/sparc64/src/drivers/pci.c	(revision 927cd9ce784b0e6c27b4862e22e7019f1b721585)
+++ kernel/arch/sparc64/src/drivers/pci.c	(revision b2fa1204c76e1eaec329888181d281aac04ed61e)
@@ -43,5 +43,5 @@
 #include <typedefs.h>
 #include <debug.h>
-#include <print.h>
+#include <log.h>
 #include <str.h>
 #include <arch/asm.h>
@@ -213,5 +213,5 @@
 		 * Unsupported model.
 		 */
-		printf("Unsupported PCI controller model (%s).\n",
+		log(LF_ARCH, LVL_WARN, "Unsupported PCI controller model (%s).",
 		    (char *) prop->value);
 	}
Index: kernel/arch/sparc64/src/drivers/scr.c
===================================================================
--- kernel/arch/sparc64/src/drivers/scr.c	(revision 927cd9ce784b0e6c27b4862e22e7019f1b721585)
+++ kernel/arch/sparc64/src/drivers/scr.c	(revision b2fa1204c76e1eaec329888181d281aac04ed61e)
@@ -81,5 +81,5 @@
 	
 	if (scr_type == SCR_UNKNOWN) {
-		printf("Unknown screen device.\n");
+		log(LF_ARCH, LVL_ERROR, "Unknown screen device.");
 		return;
 	}
@@ -117,5 +117,5 @@
 	case SCR_ATYFB:
 		if (prop->size / sizeof(ofw_pci_reg_t) < 2) {
-			printf("Too few screen registers.\n");
+			log(LF_ARCH, LVL_ERROR, "Too few screen registers.");
 			return;
 		}
@@ -124,5 +124,6 @@
 		
 		if (!ofw_pci_reg_absolutize(node, pci_reg, &pci_abs_reg)) {
-			printf("Failed to absolutize fb register.\n");
+			log(LF_ARCH, LVL_ERROR,
+			    "Failed to absolutize fb register.");
 			return;
 		}
@@ -130,5 +131,6 @@
 		if (!ofw_pci_apply_ranges(node->parent, &pci_abs_reg,
 		    &fb_addr)) {
-			printf("Failed to determine screen address.\n");
+			log(LF_ARCH, LVL_ERROR,
+			    "Failed to determine screen address.");
 			return;
 		}
@@ -152,5 +154,6 @@
 			break;
 		default:
-			printf("Unsupported bits per pixel.\n");
+			log(LF_ARCH, LVL_ERROR,
+			    "Unsupported bits per pixel.");
 			return;
 		}
@@ -159,5 +162,6 @@
 	case SCR_XVR:
 		if (prop->size / sizeof(ofw_pci_reg_t) < 2) {
-			printf("Too few screen registers.\n");
+			log(LF_ARCH, LVL_ERROR,
+			    "Too few screen registers.");
 			return;
 		}
@@ -166,5 +170,6 @@
 		
 		if (!ofw_pci_reg_absolutize(node, pci_reg, &pci_abs_reg)) {
-			printf("Failed to absolutize fb register.\n");
+			log(LF_ARCH, LVL_ERROR,
+			    "Failed to absolutize fb register.");
 			return;
 		}
@@ -172,5 +177,6 @@
 		if (!ofw_pci_apply_ranges(node->parent, &pci_abs_reg,
 		    &fb_addr)) {
-			printf("Failed to determine screen address.\n");
+			log(LF_ARCH, LVL_ERROR,
+			    "Failed to determine screen address.");
 			return;
 		}
@@ -196,5 +202,6 @@
 			break;
 		default:
-			printf("Unsupported bits per pixel.\n");
+			log(LF_ARCH, LVL_ERROR,
+			    "Unsupported bits per pixel.");
 			return;
 		}
@@ -207,5 +214,6 @@
 		upa_reg = &((ofw_upa_reg_t *) prop->value)[FFB_REG_24BPP];
 		if (!ofw_upa_apply_ranges(node->parent, upa_reg, &fb_addr)) {
-			printf("Failed to determine screen address.\n");
+			log(LF_ARCH, LVL_ERROR,
+			    "Failed to determine screen address.");
 			return;
 		}
@@ -219,5 +227,5 @@
 			break;
 		default:
-			printf("Not implemented.\n");
+			log(LF_ARCH, LVL_WARN, "Not implemented.");
 			return;
 		}
@@ -225,5 +233,6 @@
 		sbus_reg = &((ofw_sbus_reg_t *) prop->value)[0];
 		if (!ofw_sbus_apply_ranges(node->parent, sbus_reg, &fb_addr)) {
-			printf("Failed to determine screen address.\n");
+			log(LF_ARCH, LVL_ERROR,
+			    "Failed to determine screen address.");
 			return;
 		}
@@ -233,5 +242,5 @@
 	case SCR_QEMU_VGA:
 		if (prop->size / sizeof(ofw_pci_reg_t) < 2) {
-			printf("Too few screen registers.\n");
+			log(LF_ARCH, LVL_ERROR, "Too few screen registers.");
 			return;
 		}
@@ -240,5 +249,6 @@
 
 		if (!ofw_pci_reg_absolutize(node, pci_reg, &pci_abs_reg)) {
-			printf("Failed to absolutize fb register.\n");
+			log(LF_ARCH, LVL_ERROR,
+			    "Failed to absolutize fb register.");
 			return;
 		}
@@ -246,5 +256,6 @@
 		if (!ofw_pci_apply_ranges(node->parent, &pci_abs_reg,
 		    &fb_addr)) {
-			printf("Failed to determine screen address.\n");
+			log(LF_ARCH, LVL_ERROR,
+			    "Failed to determine screen address.");
 			return;
 		}
@@ -268,5 +279,5 @@
 			break;
 		default:
-			printf("Unsupported bits per pixel.\n");
+			log(LF_ARCH, LVL_ERROR, "Unsupported bits per pixel.");
 			return;
 		}
Index: kernel/arch/sparc64/src/mm/sun4v/tlb.c
===================================================================
--- kernel/arch/sparc64/src/mm/sun4v/tlb.c	(revision 927cd9ce784b0e6c27b4862e22e7019f1b721585)
+++ kernel/arch/sparc64/src/mm/sun4v/tlb.c	(revision b2fa1204c76e1eaec329888181d281aac04ed61e)
@@ -46,4 +46,5 @@
 #include <arch.h>
 #include <print.h>
+#include <log.h>
 #include <typedefs.h>
 #include <config.h>
@@ -335,5 +336,5 @@
 void tlb_print(void)
 {
-	printf("Operation not possible on Niagara.\n");
+	log(LF_ARCH, LVL_WARN, "Operation not possible on Niagara.");
 }
 
Index: kernel/arch/sparc64/src/smp/sun4u/smp.c
===================================================================
--- kernel/arch/sparc64/src/smp/sun4u/smp.c	(revision 927cd9ce784b0e6c27b4862e22e7019f1b721585)
+++ kernel/arch/sparc64/src/smp/sun4u/smp.c	(revision b2fa1204c76e1eaec329888181d281aac04ed61e)
@@ -43,5 +43,5 @@
 #include <typedefs.h>
 #include <synch/waitq.h>
-#include <print.h>
+#include <log.h>
 #include <arch/cpu_node.h>
 
@@ -108,6 +108,6 @@
 	if (waitq_sleep_timeout(&ap_completion_wq, 1000000, SYNCH_FLAGS_NONE) ==
 	    ESYNCH_TIMEOUT)
-		printf("%s: waiting for processor (mid = %" PRIu32
-		    ") timed out\n", __func__, mid);
+		log(LF_ARCH, LVL_NOTE, "%s: waiting for processor (mid = %" PRIu32
+		    ") timed out", __func__, mid);
 }
 
Index: kernel/arch/sparc64/src/sun4v/md.c
===================================================================
--- kernel/arch/sparc64/src/sun4v/md.c	(revision 927cd9ce784b0e6c27b4862e22e7019f1b721585)
+++ kernel/arch/sparc64/src/sun4v/md.c	(revision b2fa1204c76e1eaec329888181d281aac04ed61e)
@@ -36,5 +36,5 @@
 #include <panic.h>
 #include <func.h>
-#include <print.h>
+#include <log.h>
 #include <str.h>
 #include <arch/sun4v/md.h>
@@ -310,6 +310,6 @@
 	retval = retval;
 	if (retval != HV_EOK) {
-		printf("Could not retrieve machine description, "
-		    "error=%" PRIu64 ".\n", retval);
+		log(LF_ARCH, LVL_ERROR, "Could not retrieve machine "
+		    "description, error=%" PRIu64 ".", retval);
 	}
 }
Index: kernel/arch/sparc64/src/trap/sun4u/interrupt.c
===================================================================
--- kernel/arch/sparc64/src/trap/sun4u/interrupt.c	(revision 927cd9ce784b0e6c27b4862e22e7019f1b721585)
+++ kernel/arch/sparc64/src/trap/sun4u/interrupt.c	(revision b2fa1204c76e1eaec329888181d281aac04ed61e)
@@ -42,5 +42,5 @@
 #include <arch/asm.h>
 #include <arch/barrier.h>
-#include <print.h>
+#include <log.h>
 #include <arch.h>
 #include <mm/tlb.h>
@@ -96,6 +96,7 @@
 		 */
 #ifdef CONFIG_DEBUG
-		printf("cpu%u: spurious interrupt (intrcv=%#" PRIx64
-		    ", data0=%#" PRIx64 ")\n", CPU->id, intrcv, data0);
+		log(LF_ARCH, LVL_DEBUG,
+		    "cpu%u: spurious interrupt (intrcv=%#" PRIx64 ", data0=%#"
+		    PRIx64 ")", CPU->id, intrcv, data0);
 #else
 		(void) intrcv;
Index: kernel/arch/sparc64/src/trap/sun4v/interrupt.c
===================================================================
--- kernel/arch/sparc64/src/trap/sun4v/interrupt.c	(revision 927cd9ce784b0e6c27b4862e22e7019f1b721585)
+++ kernel/arch/sparc64/src/trap/sun4v/interrupt.c	(revision b2fa1204c76e1eaec329888181d281aac04ed61e)
@@ -42,5 +42,5 @@
 #include <arch/asm.h>
 #include <arch/barrier.h>
-#include <print.h>
+#include <log.h>
 #include <arch.h>
 #include <mm/tlb.h>
@@ -111,6 +111,6 @@
 			((void (*)(void)) data1)();
 		} else {
-			printf("Spurious interrupt on %" PRIu64 ", data = %" PRIx64 ".\n",
-			    CPU->arch.id, data1);
+			log(LF_ARCH, LVL_DEBUG, "Spurious interrupt on %" PRIu64
+			    ", data = %" PRIx64 ".", CPU->arch.id, data1);
 		}
 	}
Index: kernel/genarch/src/acpi/acpi.c
===================================================================
--- kernel/genarch/src/acpi/acpi.c	(revision 927cd9ce784b0e6c27b4862e22e7019f1b721585)
+++ kernel/genarch/src/acpi/acpi.c	(revision b2fa1204c76e1eaec329888181d281aac04ed61e)
@@ -41,5 +41,5 @@
 #include <mm/page.h>
 #include <mm/km.h>
-#include <print.h>
+#include <log.h>
 
 #define RSDP_SIGNATURE      "RSD PTR "
@@ -211,10 +211,10 @@
 	
 	if ((acpi_rsdt) && (!acpi_sdt_check((uint8_t *) acpi_rsdt))) {
-		printf("RSDT: bad checksum\n");
+		log(LF_ARCH, LVL_ERROR, "RSDT: bad checksum");
 		return;
 	}
 	
 	if ((acpi_xsdt) && (!acpi_sdt_check((uint8_t *) acpi_xsdt))) {
-		printf("XSDT: bad checksum\n");
+		log(LF_ARCH, LVL_ERROR, "XSDT: bad checksum");
 		return;
 	}
Index: kernel/genarch/src/acpi/madt.c
===================================================================
--- kernel/genarch/src/acpi/madt.c	(revision 927cd9ce784b0e6c27b4862e22e7019f1b721585)
+++ kernel/genarch/src/acpi/madt.c	(revision b2fa1204c76e1eaec329888181d281aac04ed61e)
@@ -43,5 +43,5 @@
 #include <debug.h>
 #include <config.h>
-#include <print.h>
+#include <log.h>
 #include <mm/slab.h>
 #include <memstr.h>
@@ -236,5 +236,6 @@
 		case MADT_L_SAPIC:
 		case MADT_PLATFORM_INTR_SRC:
-			printf("MADT: Skipping %s entry (type=%" PRIu8 ")\n",
+			log(LF_ARCH, LVL_WARN,
+			    "MADT: Skipping %s entry (type=%" PRIu8 ")",
 			    entry[hdr->type], hdr->type);
 			break;
@@ -242,9 +243,11 @@
 			if ((hdr->type >= MADT_RESERVED_SKIP_BEGIN)
 			    && (hdr->type <= MADT_RESERVED_SKIP_END))
-				printf("MADT: Skipping reserved entry (type=%" PRIu8 ")\n",
+				log(LF_ARCH, LVL_NOTE,
+				    "MADT: Skipping reserved entry (type=%" PRIu8 ")",
 				    hdr->type);
 				
 			if (hdr->type >= MADT_RESERVED_OEM_BEGIN)
-				printf("MADT: Skipping OEM entry (type=%" PRIu8 ")\n",
+				log(LF_ARCH, LVL_NOTE,
+				    "MADT: Skipping OEM entry (type=%" PRIu8 ")",
 				    hdr->type);
 			
Index: kernel/genarch/src/drivers/via-cuda/cuda.c
===================================================================
--- kernel/genarch/src/drivers/via-cuda/cuda.c	(revision 927cd9ce784b0e6c27b4862e22e7019f1b721585)
+++ kernel/genarch/src/drivers/via-cuda/cuda.c	(revision b2fa1204c76e1eaec329888181d281aac04ed61e)
@@ -118,5 +118,5 @@
 }
 
-#include <print.h>
+#include <log.h>
 void cuda_wire(cuda_instance_t *instance, indev_t *kbrdin)
 {
@@ -197,5 +197,5 @@
 
 	if ((b & TREQ) != 0) {
-		printf("cuda_irq_listen: no TREQ?!\n");
+		log(LF_OTHER, LVL_ERROR, "cuda_irq_listen: no TREQ?!");
 		return;
 	}
Index: kernel/generic/include/synch/spinlock.h
===================================================================
--- kernel/generic/include/synch/spinlock.h	(revision 927cd9ce784b0e6c27b4862e22e7019f1b721585)
+++ kernel/generic/include/synch/spinlock.h	(revision b2fa1204c76e1eaec329888181d281aac04ed61e)
@@ -137,5 +137,5 @@
 #ifdef CONFIG_DEBUG_SPINLOCK
 
-#include <print.h>
+#include <log.h>
 
 #define DEADLOCK_THRESHOLD  100000000
@@ -146,5 +146,6 @@
 	if ((pname)++ > (value)) { \
 		(pname) = 0; \
-		printf("Deadlock probe %s: exceeded threshold %u\n" \
+		log(LF_OTHER, LVL_WARN, \
+		    "Deadlock probe %s: exceeded threshold %u\n" \
 		    "cpu%u: function=%s, line=%u\n", \
 		    #pname, (value), CPU->id, __func__, __LINE__); \
Index: kernel/generic/src/console/cmd.c
===================================================================
--- kernel/generic/src/console/cmd.c	(revision 927cd9ce784b0e6c27b4862e22e7019f1b721585)
+++ kernel/generic/src/console/cmd.c	(revision b2fa1204c76e1eaec329888181d281aac04ed61e)
@@ -45,4 +45,5 @@
 #include <console/kconsole.h>
 #include <print.h>
+#include <log.h>
 #include <panic.h>
 #include <typedefs.h>
@@ -639,5 +640,6 @@
 	for (i = 0; basic_commands[i]; i++) {
 		if (!cmd_register(basic_commands[i])) {
-			printf("Cannot register command %s\n",
+			log(LF_OTHER, LVL_ERROR,
+			    "Cannot register command %s",
 			    basic_commands[i]->name);
 		}
@@ -665,5 +667,5 @@
 	unsigned int _len = (unsigned int) len;
 	if ((_len != len) || (((int) _len) < 0)) {
-		printf("Command length overflow\n");
+		log(LF_OTHER, LVL_ERROR, "Command length overflow");
 		return 1;
 	}
Index: kernel/generic/src/lib/func.c
===================================================================
--- kernel/generic/src/lib/func.c	(revision 927cd9ce784b0e6c27b4862e22e7019f1b721585)
+++ kernel/generic/src/lib/func.c	(revision b2fa1204c76e1eaec329888181d281aac04ed61e)
@@ -37,5 +37,5 @@
 
 #include <func.h>
-#include <print.h>
+#include <log.h>
 #include <cpu.h>
 #include <arch/asm.h>
@@ -72,7 +72,7 @@
 	
 	if (CPU)
-		printf("cpu%u: halted\n", CPU->id);
+		log(LF_OTHER, LVL_NOTE, "cpu%u: halted", CPU->id);
 	else
-		printf("cpu: halted\n");
+		log(LF_OTHER, LVL_NOTE, "cpu: halted");
 	
 	cpu_halt();
Index: kernel/generic/src/lib/rd.c
===================================================================
--- kernel/generic/src/lib/rd.c	(revision 927cd9ce784b0e6c27b4862e22e7019f1b721585)
+++ kernel/generic/src/lib/rd.c	(revision b2fa1204c76e1eaec329888181d281aac04ed61e)
@@ -38,5 +38,5 @@
  */
 
-#include <print.h>
+#include <log.h>
 #include <lib/rd.h>
 #include <mm/frame.h>
@@ -68,5 +68,6 @@
 	sysinfo_set_item_val("rd.address.physical", NULL, (sysarg_t) base);
 	
-	printf("RAM disk at %p (size %zu bytes)\n", (void *) base, size);
+	log(LF_OTHER, LVL_NOTE, "RAM disk at %p (size %zu bytes)", (void *) base,
+	    size);
 }
 
Index: kernel/generic/src/main/kinit.c
===================================================================
--- kernel/generic/src/main/kinit.c	(revision 927cd9ce784b0e6c27b4862e22e7019f1b721585)
+++ kernel/generic/src/main/kinit.c	(revision b2fa1204c76e1eaec329888181d281aac04ed61e)
@@ -59,4 +59,5 @@
 #include <mm/km.h>
 #include <print.h>
+#include <log.h>
 #include <memstr.h>
 #include <console/console.h>
@@ -140,5 +141,6 @@
 				thread_ready(thread);
 			} else
-				printf("Unable to create kcpulb thread for cpu%u\n", i);
+				log(LF_OTHER, LVL_ERROR,
+				    "Unable to create kcpulb thread for cpu%u", i);
 		}
 	}
@@ -156,5 +158,5 @@
 		thread_ready(thread);
 	else
-		printf("Unable to create kload thread\n");
+		log(LF_OTHER, LVL_ERROR, "Unable to create kload thread");
 	
 #ifdef CONFIG_KCONSOLE
@@ -168,5 +170,6 @@
 			thread_ready(thread);
 		else
-			printf("Unable to create kconsole thread\n");
+			log(LF_OTHER, LVL_ERROR,
+			    "Unable to create kconsole thread");
 	}
 #endif /* CONFIG_KCONSOLE */
@@ -210,5 +213,6 @@
 	for (i = 0; i < init.cnt; i++) {
 		if (init.tasks[i].paddr % FRAME_SIZE) {
-			printf("init[%zu]: Address is not frame aligned\n", i);
+			log(LF_OTHER, LVL_ERROR,
+			    "init[%zu]: Address is not frame aligned", i);
 			programs[i].task = NULL;
 			continue;
@@ -273,6 +277,7 @@
 			init_rd((void *) init.tasks[i].paddr, init.tasks[i].size);
 		} else
-			printf("init[%zu]: Init binary load failed "
-			    "(error %d, loader status %u)\n", i, rc,
+			log(LF_OTHER, LVL_ERROR,
+			    "init[%zu]: Init binary load failed "
+			    "(error %d, loader status %u)", i, rc,
 			    programs[i].loader_status);
 	}
Index: kernel/generic/src/main/shutdown.c
===================================================================
--- kernel/generic/src/main/shutdown.c	(revision 927cd9ce784b0e6c27b4862e22e7019f1b721585)
+++ kernel/generic/src/main/shutdown.c	(revision b2fa1204c76e1eaec329888181d281aac04ed61e)
@@ -39,4 +39,5 @@
 #include <func.h>
 #include <print.h>
+#include <log.h>
 
 void reboot(void)
@@ -45,5 +46,5 @@
 	
 #ifdef CONFIG_DEBUG
-	printf("Rebooting the system\n");
+	log(LF_OTHER, LVL_DEBUG, "Rebooting the system");
 #endif
 	
Index: kernel/generic/src/mm/frame.c
===================================================================
--- kernel/generic/src/mm/frame.c	(revision 927cd9ce784b0e6c27b4862e22e7019f1b721585)
+++ kernel/generic/src/mm/frame.c	(revision b2fa1204c76e1eaec329888181d281aac04ed61e)
@@ -54,4 +54,5 @@
 #include <arch.h>
 #include <print.h>
+#include <log.h>
 #include <align.h>
 #include <mm/slab.h>
@@ -121,5 +122,6 @@
 {
 	if (zones.count + 1 == ZONES_MAX) {
-		printf("Maximum zone count %u exceeded!\n", ZONES_MAX);
+		log(LF_OTHER, LVL_ERROR, "Maximum zone count %u exceeded!",
+		    ZONES_MAX);
 		return (size_t) -1;
 	}
@@ -141,6 +143,7 @@
 			    (!iswithin(zones.info[i].base, zones.info[i].count,
 			    base, count))) {
-				printf("Zone (%p, %p) overlaps "
-				    "with previous zone (%p %p)!\n",
+				log(LF_OTHER, LVL_WARN,
+				    "Zone (%p, %p) overlaps "
+				    "with previous zone (%p %p)!",
 				    (void *) PFN2ADDR(base), (void *) PFN2ADDR(count),
 				    (void *) PFN2ADDR(zones.info[i].base),
@@ -913,6 +916,7 @@
 		
 #ifdef CONFIG_DEBUG
-		printf("Thread %" PRIu64 " waiting for %zu frames "
-		    "(%zu available).\n", THREAD->tid, count, avail);
+		log(LF_OTHER, LVL_DEBUG,
+		    "Thread %" PRIu64 " waiting for %zu frames "
+		    "%zu available.", THREAD->tid, count, avail);
 #endif
 		
@@ -938,5 +942,6 @@
 		
 #ifdef CONFIG_DEBUG
-		printf("Thread %" PRIu64 " woken up.\n", THREAD->tid);
+		log(LF_OTHER, LVL_DEBUG, "Thread %" PRIu64 " woken up.",
+		    THREAD->tid);
 #endif
 		
Index: kernel/generic/src/proc/program.c
===================================================================
--- kernel/generic/src/proc/program.c	(revision 927cd9ce784b0e6c27b4862e22e7019f1b721585)
+++ kernel/generic/src/proc/program.c	(revision b2fa1204c76e1eaec329888181d281aac04ed61e)
@@ -49,5 +49,5 @@
 #include <lib/elf_load.h>
 #include <errno.h>
-#include <print.h>
+#include <log.h>
 #include <syscall/copy.h>
 #include <proc/program.h>
@@ -155,5 +155,5 @@
 		
 		program_loader = image_addr;
-		printf("Program loader at %p\n", (void *) image_addr);
+		log(LF_OTHER, LVL_NOTE, "Program loader at %p", (void *) image_addr);
 		
 		return EOK;
@@ -181,5 +181,6 @@
 	if (!loader) {
 		as_destroy(as);
-		printf("Cannot spawn loader as none was registered\n");
+		log(LF_OTHER, LVL_ERROR,
+		    "Cannot spawn loader as none was registered");
 		return ENOENT;
 	}
@@ -189,5 +190,5 @@
 	if (prg->loader_status != EE_OK) {
 		as_destroy(as);
-		printf("Cannot spawn loader (%s)\n",
+		log(LF_OTHER, LVL_ERROR, "Cannot spawn loader (%s)",
 		    elf_error(prg->loader_status));
 		return ENOENT;
Index: kernel/generic/src/proc/scheduler.c
===================================================================
--- kernel/generic/src/proc/scheduler.c	(revision 927cd9ce784b0e6c27b4862e22e7019f1b721585)
+++ kernel/generic/src/proc/scheduler.c	(revision b2fa1204c76e1eaec329888181d281aac04ed61e)
@@ -61,4 +61,5 @@
 #include <cpu.h>
 #include <print.h>
+#include <log.h>
 #include <debug.h>
 #include <stacktrace.h>
@@ -517,6 +518,7 @@
 	
 #ifdef SCHEDULER_VERBOSE
-	printf("cpu%u: tid %" PRIu64 " (priority=%d, ticks=%" PRIu64
-	    ", nrdy=%" PRIua ")\n", CPU->id, THREAD->tid, THREAD->priority,
+	log(LF_OTHER, LVL_DEBUG,
+	    "cpu%u: tid %" PRIu64 " (priority=%d, ticks=%" PRIu64
+	    ", nrdy=%" PRIua ")", CPU->id, THREAD->tid, THREAD->priority,
 	    THREAD->ticks, atomic_get(&CPU->nrdy));
 #endif
@@ -663,6 +665,7 @@
 				
 #ifdef KCPULB_VERBOSE
-				printf("kcpulb%u: TID %" PRIu64 " -> cpu%u, "
-				    "nrdy=%ld, avg=%ld\n", CPU->id, t->tid,
+				log(LF_OTHER, LVL_DEBUG,
+				    "kcpulb%u: TID %" PRIu64 " -> cpu%u, "
+				    "nrdy=%ld, avg=%ld", CPU->id, t->tid,
 				    CPU->id, atomic_get(&CPU->nrdy),
 				    atomic_get(&nrdy) / config.cpu_active);
Index: kernel/generic/src/syscall/syscall.c
===================================================================
--- kernel/generic/src/syscall/syscall.c	(revision 927cd9ce784b0e6c27b4862e22e7019f1b721585)
+++ kernel/generic/src/syscall/syscall.c	(revision b2fa1204c76e1eaec329888181d281aac04ed61e)
@@ -87,5 +87,6 @@
 		rc = syscall_table[id](a1, a2, a3, a4, a5, a6);
 	} else {
-		printf("Task %" PRIu64": Unknown syscall %#" PRIxn, TASK->taskid, id);
+		log(LF_OTHER, LVL_ERROR,
+		    "Task %" PRIu64": Unknown syscall %#" PRIxn, TASK->taskid, id);
 		task_kill_self(true);
 	}
