1 // Copyright 2018 The Fuchsia Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #pragma once
6 
7 #include <ddk/debug.h>
8 
9 // Verbose logging macros useful when debugging driver behavior.  Enable by adding
10 // "driver.zxcrypt.log=+spew" to the kernel command line arguments when booting.
11 #define LOG_ENTRY() LOG_ENTRY_ARGS("")
12 #define LOG_ENTRY_ARGS(fmt, ...)                                                                   \
13     zxlogf(SPEW, "%s:%d - %s(" fmt ")\n", __FILE__, __LINE__, __PRETTY_FUNCTION__, ##__VA_ARGS__)
14