Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 26 additions & 26 deletions src/Logging.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,92 +3,92 @@ pragma solidity ^0.8.0;

abstract contract Logging {
event Log(string debugString);
event Log(string description, string data);
event Log(string prefix, string description, string data);
event Log(string description, bytes32 data);
event Log(string prefix, string description, bytes32 data);
event Log(string description, uint256 data);
event Log(string prefix, string description, uint256 data);
event Log(string description, int256 data);
event Log(string prefix, string description, int256 data);
event Log(string description, address data);
event Log(string prefix, string description, address data);
event Log(string description, bool data);
event Log(string prefix, string description, bool data);
event LogString(string description, string data);
event LogString(string prefix, string description, string data);
event LogBytes(string description, bytes data);
event LogBytes(string prefix, string description, bytes data);
event LogUint(string description, uint256 data);
event LogUint(string prefix, string description, uint256 data);
event LogInt(string description, int256 data);
event LogInt(string prefix, string description, int256 data);
event LogAddress(string description, address data);
event LogAddress(string prefix, string description, address data);
event LogBool(string description, bool data);
event LogBool(string prefix, string description, bool data);

function log(string memory debugString) internal {
emit Log(debugString);
}

function log(string memory description, string memory data) internal {
emit Log(description, data);
emit LogString(description, data);
}

function log(
string memory prefix,
string memory description,
string memory data
) internal {
emit Log(prefix, description, data);
emit LogString(prefix, description, data);
}

function log(string memory description, bytes32 data) internal {
emit Log(description, data);
function log(string memory description, bytes memory data) internal {
emit LogBytes(description, data);
}

function log(
string memory prefix,
string memory description,
bytes32 data
bytes memory data
) internal {
emit Log(prefix, description, data);
emit LogBytes(prefix, description, data);
}

function log(string memory description, uint256 data) internal {
emit Log(description, data);
emit LogUint(description, data);
}

function log(
string memory prefix,
string memory description,
uint256 data
) internal {
emit Log(prefix, description, data);
emit LogUint(prefix, description, data);
}

function log(string memory description, int256 data) internal {
emit Log(description, data);
emit LogInt(description, data);
}

function log(
string memory prefix,
string memory description,
int256 data
) internal {
emit Log(prefix, description, data);
emit LogInt(prefix, description, data);
}

function log(string memory description, address data) internal {
emit Log(description, data);
emit LogAddress(description, data);
}

function log(
string memory prefix,
string memory description,
address data
) internal {
emit Log(prefix, description, data);
emit LogAddress(prefix, description, data);
}

function log(string memory description, bool data) internal {
emit Log(description, data);
emit LogBool(description, data);
}

function log(
string memory prefix,
string memory description,
bool data
) internal {
emit Log(prefix, description, data);
emit LogBool(prefix, description, data);
}
}