diff options
author | David Robillard <d@drobilla.net> | 2020-11-27 18:54:27 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-11-27 21:52:17 +0100 |
commit | dbe6899651ac929f59af160dd07aaf6bda079b23 (patch) | |
tree | 49243cfa13dc3bba18526dc5eeb64f615a23c587 /src/PatchageEvent.cpp | |
parent | 5dad45517e9dfa8b043f368cf31b2795fb713fde (diff) | |
download | patchage-dbe6899651ac929f59af160dd07aaf6bda079b23.tar.gz patchage-dbe6899651ac929f59af160dd07aaf6bda079b23.tar.bz2 patchage-dbe6899651ac929f59af160dd07aaf6bda079b23.zip |
Factor out log from Patchage class
Towards saner dependencies.
Diffstat (limited to 'src/PatchageEvent.cpp')
-rw-r--r-- | src/PatchageEvent.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/PatchageEvent.cpp b/src/PatchageEvent.cpp index 4df2924..0f5645a 100644 --- a/src/PatchageEvent.cpp +++ b/src/PatchageEvent.cpp @@ -69,11 +69,11 @@ PatchageEvent::execute(Patchage* patchage) if (driver) { PatchagePort* port = driver->create_port_view(patchage, _port_1); if (!port) { - patchage->error_msg(fmt::format( + patchage->log().error_msg(fmt::format( "Unable to create view for port `{}'", _port_1)); } } else { - patchage->error_msg( + patchage->log().error_msg( fmt::format("Unknown type for port `{}'", _port_1)); } @@ -87,10 +87,10 @@ PatchageEvent::execute(Patchage* patchage) PatchagePort* port_2 = patchage->canvas()->find_port(_port_2); if (!port_1) { - patchage->error_msg( + patchage->log().error_msg( fmt::format("Unable to find port `{}' to connect", _port_1)); } else if (!port_2) { - patchage->error_msg( + patchage->log().error_msg( fmt::format("Unable to find port `{}' to connect", _port_2)); } else { patchage->canvas()->make_connection(port_1, port_2); @@ -102,10 +102,10 @@ PatchageEvent::execute(Patchage* patchage) PatchagePort* port_2 = patchage->canvas()->find_port(_port_2); if (!port_1) { - patchage->error_msg( + patchage->log().error_msg( fmt::format("Unable to find port `{}' to disconnect", _port_1)); } else if (!port_2) { - patchage->error_msg( + patchage->log().error_msg( fmt::format("Unable to find port `{}' to disconnect", _port_2)); } else { patchage->canvas()->remove_edge_between(port_1, port_2); |