This repository has been archived by the owner on Oct 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Showing
6 changed files
with
63 additions
and
10 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
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,31 @@ | ||
import { invoke } from "@tauri-apps/api" | ||
|
||
const getTime = () => { | ||
return new Date().toLocaleString("hu") | ||
} | ||
|
||
export const log = (message: string) => { | ||
const time = getTime() | ||
|
||
console.log(`[AUTHME LOG] (${time}) ${`${message}`}`) | ||
|
||
invoke("logger", { message, time, kind: "log" }) | ||
} | ||
|
||
export const warn = (message: string) => { | ||
const time = getTime() | ||
|
||
console.log(`[AUTHME WARN] (${time}) ${message}`) | ||
|
||
invoke("logger", { message, time, kind: "warn" }) | ||
} | ||
|
||
export const error = (message: string) => { | ||
const time = getTime() | ||
|
||
console.log(`[AUTHME ERROR] (${time}) ${message}`) | ||
|
||
invoke("logger", { message, time, kind: "error" }) | ||
} | ||
|
||
export default { log, warn, error } |
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