upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/dstorage_trace.h
blob: 3c2eda2171395732b906725250b5473b175de5b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#pragma once
#include <windows.h>

namespace leonida::dstorage {
inline bool trace_enabled() {
    static const bool enabled = [] {
        char value[2]{};
        return GetEnvironmentVariableA("LEONIDA_DSTORAGE_TRACE", value, sizeof value) == 1 && value[0] == '1';
    }();
    return enabled;
}
} // namespace leonida::dstorage