-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nathaniel May
committed
Oct 28, 2021
1 parent
080d756
commit 1d2ff5f
Showing
4 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .adapter_endpoint import AdapterLogger # noqa: F401 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from dataclasses import dataclass | ||
from dbt.events.functions import fire_event | ||
from dbt.events.types import ( | ||
AdapterEventDebug, AdapterEventInfo, AdapterEventWarning, AdapterEventError | ||
) | ||
|
||
|
||
@dataclass | ||
class AdapterLogger(): | ||
name: str | ||
|
||
def debug(self, msg: str): | ||
fire_event(AdapterEventDebug(name=self.name, raw_msg=msg)) | ||
|
||
def info(self, msg: str): | ||
fire_event(AdapterEventInfo(name=self.name, raw_msg=msg)) | ||
|
||
def warning(self, msg: str): | ||
fire_event(AdapterEventWarning(name=self.name, raw_msg=msg)) | ||
|
||
def error(self, msg: str): | ||
fire_event(AdapterEventError(name=self.name, raw_msg=msg)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters