Skip to content

Commit 0dcaf74

Browse files
committed
Update to version 1.0.0
0 parents  commit 0dcaf74

40 files changed

+1864
-0
lines changed

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Editorconfig to keep settings the same across devices and editors
2+
# https://editorconfig.org/
3+
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
indent_style = tab
9+
insert_final_newline = true
10+
tab_width = 4
11+
trim_trailing_whitespace = true
12+
13+
[*.{html,md,py,rs}]
14+
indent_size = 4
15+
indent_style = space
16+
17+
[*.{yml,yaml}]
18+
indent_style = space

.github/.gitlint

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[general]
2+
ignore=B6

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Global owner
2+
* @ElBe-Plaq

.github/CODE_OF_CONDUCT.md

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
24+
* Focusing on what is best not just for us as individuals, but for the overall community
25+
26+
Examples of unacceptable behavior include:
27+
28+
* The use of sexualized language or imagery, and sexual attention or advances of any kind
29+
* Trolling, insulting or derogatory comments, and personal or political attacks
30+
* Public or private harassment
31+
* Publishing others' private information, such as a physical or email address, without their explicit permission
32+
* Other conduct which could reasonably be considered inappropriate in a professional setting
33+
34+
## Enforcement Responsibilities
35+
36+
Community leaders are responsible for clarifying and enforcing our standards of
37+
acceptable behavior and will take appropriate and fair corrective action in
38+
response to any behavior that they deem inappropriate, threatening, offensive,
39+
or harmful.
40+
41+
Community leaders have the right and responsibility to remove, edit, or reject
42+
comments, commits, code, wiki edits, issues, and other contributions that are
43+
not aligned to this Code of Conduct, and will communicate reasons for moderation
44+
decisions when appropriate.
45+
46+
## Scope
47+
48+
This Code of Conduct applies within all community spaces, and also applies when
49+
an individual is officially representing the community in public spaces.
50+
Examples of representing our community include using an official e-mail address,
51+
posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event.
53+
54+
## Enforcement
55+
56+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
57+
reported to the community leaders responsible for enforcement on
58+
[our discord server](https://discord.gg/JVyyDukQqV).
59+
All complaints will be reviewed and investigated promptly and fairly.
60+
61+
All community leaders are obligated to respect the privacy and security of the
62+
reporter of any incident.
63+
64+
## Enforcement Guidelines
65+
66+
Community leaders will follow these Community Impact Guidelines in determining
67+
the consequences for any action they deem in violation of this Code of Conduct:
68+
69+
### 1. Correction
70+
71+
**Community Impact**: Use of inappropriate language or other behavior deemed
72+
unprofessional or unwelcome in the community.
73+
74+
**Consequence**: A private, written warning from community leaders, providing
75+
clarity around the nature of the violation and an explanation of why the
76+
behavior was inappropriate. A public apology may be requested.
77+
78+
### 2. Warning
79+
80+
**Community Impact**: A violation through a single incident or series
81+
of actions.
82+
83+
**Consequence**: A warning with consequences for continued behavior. No
84+
interaction with the people involved, including unsolicited interaction with
85+
those enforcing the Code of Conduct, for a specified period of time. This
86+
includes avoiding interactions in community spaces as well as external channels
87+
like social media. Violating these terms may lead to a temporary or
88+
permanent ban.
89+
90+
### 3. Temporary Ban
91+
92+
**Community Impact**: A serious violation of community standards, including
93+
sustained inappropriate behavior.
94+
95+
**Consequence**: A temporary ban from any sort of interaction or public
96+
communication with the community for a specified period of time. No public or
97+
private interaction with the people involved, including unsolicited interaction
98+
with those enforcing the Code of Conduct, is allowed during this period.
99+
Violating these terms may lead to a permanent ban.
100+
101+
### 4. Permanent Ban
102+
103+
**Community Impact**: Demonstrating a pattern of violation of community
104+
standards, including sustained inappropriate behavior, harassment of an
105+
individual, or aggression toward or disparagement of classes of individuals.
106+
107+
**Consequence**: A permanent ban from any sort of public interaction within
108+
the community.
109+
110+
## Attribution
111+
112+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html),
113+
version 2.0, available at
114+
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html).
115+
116+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
117+
enforcement ladder](https://github.com/mozilla/diversity).
118+
119+
For answers to common questions about this code of conduct, see the FAQ at
120+
[https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are available at
121+
[https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations).

.github/CONTRIBUTING.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# How to contribute to this project
2+
3+
Did you find a bug? You want to have a feature implemented? You made code better?
4+
Please follow the instructions below on how to contribute to this project.
5+
6+
## Notes
7+
8+
Please do **not** report an issue of pull request if the issue is a security vulnerability.
9+
There is a different way to report such issues. Issues or pull requests about a vulnerability will be removed.
10+
11+
<div style="text-align: center">
12+
<h4>Report vulnerabilities <a href="https://github.com/ElBe-Development/logging-rs/security/advisories/new">here</a></h4>
13+
</div>
14+
15+
## Contributing
16+
17+
For any issues or proposals, open an issue. If you already wrote your proposed change(s), please open an issue
18+
and a pull request. See below for making changes on your own.
19+
20+
### Making changes on your own
21+
22+
1. Create a new issue with a summary of your proposed changes and more.
23+
2. Fork the repository.
24+
3. Implement your changes
25+
4. Test your changes. Run `cargo fmt`, `cargo check` and `cargo clippy` to verify it works.
26+
5. Create a pull request from your fork.
27+
6. If it gets accepted, your changes will be in the next release.
28+
29+
To everyone who has reported issues, proposed changes or just helped with peoples questions: Thank you!

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
ko_fi: elbeplaq

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: "[BUG] TITLE"
5+
labels: Bug
6+
assignees: ElBe-Plaq
7+
---
8+
9+
**Describe the bug**
10+
A clear and concise description of what the bug is.
11+
12+
**To Reproduce**
13+
Steps to reproduce the behavior:
14+
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
28+
- OS: [e.g. iOS]
29+
- Rust version [eg. 1.69]
30+
- Version [e.g. 22]
31+
32+
**Additional context**
33+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
blank_issues_enabled: false
3+
contact_links:
4+
- name: Discord Server
5+
url: https://discord.gg/JVyyDukQqV
6+
about: Please ask and answer questions here or just chat with the communtiy.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
name: Documentation
3+
about: Improvements to the documentation.
4+
title: "[DOCUMENTATION] TITLE"
5+
labels: Documentation
6+
assignees: ElBe-Plaq
7+
---

.github/ISSUE_TEMPLATE/enhancement.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
name: Enhancement
3+
about: Improves something already existing.
4+
title: "[ENHANCEMENT] TITLE"
5+
labels: Enhancement
6+
assignees: ElBe-Plaq
7+
---
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: "[FEATURE] TITLE"
5+
labels: Feature request
6+
assignees: ElBe-Plaq
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11+
12+
**Describe the solution you'd like**
13+
A clear and concise description of what you want to happen.
14+
15+
**Describe alternatives you've considered**
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
**Additional context**
19+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Description
2+
3+
Summary of all the changes made.
4+
5+
Closes #(issues that get closed, if this pull request gets closed)
6+
7+
## Type of change
8+
9+
<!-- Select the relevant option(s) -->
10+
11+
- [ ] Bug fix (non-breaking change which fixes an issue)
12+
- [ ] New feature (non-breaking change which adds functionality)
13+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
14+
- [ ] This change requires a documentation update
15+
- [ ] Something else
16+
17+
# Checklist:
18+
19+
- [ ] My code follows the style guidelines of this project
20+
- [ ] I have performed a self-review of my code
21+
- [ ] I have commented my code, particularly in hard-to-understand areas
22+
- [ ] I have made corresponding changes to the documentation
23+
- [ ] My changes generate no new errors or linter warnings
24+
- [ ] My changes generate no problems with other code
25+
- [ ] I have added tests that prove my fix is effective or that my feature works
26+
- [ ] New and existing tests passed locally with my changes

.github/README.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
<h1 align="center">
2+
logging-rs
3+
</h1>
4+
<h3 align="center">
5+
logging-rs helps you add logging to your projects using simple macros.
6+
</h3>
7+
<p align="center">
8+
<img src="https://img.shields.io/crates/v/logging-rs">
9+
<img src="https://www.codefactor.io/repository/github/ElBe-Development/logging-rs/badge">
10+
<img src="https://github.com/ElBe-Development/logging-rs/actions/workflows/megalinter.yml/badge.svg?branch=main&event=push">
11+
<img src="https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit">
12+
</p>
13+
14+
<img src="https://github.com/ElBe-Development/logging-rs/blob/main/.github/example.png?raw=true"/>
15+
16+
## About this project
17+
18+
logging-rs helps you add logging to your projects using simple macros.
19+
20+
## Installing
21+
22+
Run the following command to add the package to your dependencies:
23+
24+
```bash
25+
26+
$ cargo add logging-rs
27+
...
28+
29+
```
30+
31+
### Git
32+
33+
To clone the repository locally using git run `git clone https://github.com/ElBe-Development/logging-rs.git`.
34+
35+
## Usage
36+
37+
To use logging-rs you need a configuration. It's best to keep it the same across multiple files. You then need to follow these steps:
38+
39+
1. Import the logging-rs crate:
40+
41+
```rust,ignore
42+
use logging_rs;
43+
```
44+
45+
2. Create a new logger object:
46+
47+
```rust,ignore
48+
let logger = logging_rs::Logger::new(logging_rs::Formatter::default(), vec![logging_rs::Output::STDOUT]);
49+
```
50+
51+
3. Log the messages you want to log:
52+
53+
```rust,ignore
54+
logging_rs::debug!(logger, "Debug message");
55+
logging_rs::info!(logger, "Info");
56+
logging_rs::warn!(logger, "Warning");
57+
logging_rs::error!(logger, "Error!");
58+
logging_rs::fatal!(logger, "Fatal error!");
59+
logging_rs::log!(logger, "Log message");
60+
```
61+
62+
## Example
63+
64+
With the following rust code:
65+
66+
```rust,ignore
67+
use logging_rs;
68+
69+
fn main() {
70+
let logger = logging_rs::Logger::default();
71+
72+
logging_rs::debug!(logger, "Debug message");
73+
}
74+
```
75+
76+
You will get the following output:
77+
78+
```bash
79+
[TIMESTAMP] [DEBUG] src\main.rs: Debug message
80+
```
81+
82+
Where `TIMESTAMP` is the current timestamp.
83+
84+
## Contact
85+
86+
To contact us, get help or just chat with others, you can visit [our discord server](https://discord.gg/JVyyDukQqV).

.github/SECURITY.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
| Version | Supported |
6+
| -------- | ------------------ |
7+
| `v1.0.0` | :white_check_mark: |
8+
9+
## Reporting a Vulnerability
10+
11+
To report a vulnerability, go to [our discord server](https://discord.gg/JVyyDukQqV), write an
12+
[E-Mail](mailto:elbe.dev.plaq@gmail.com) or report it via
13+
[GitHubs security reporting system](https://github.com/ElBe-Development/logging-rs/security/advisories/new)
14+
(preferred).

.github/SUPPORT.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Support
2+
3+
You can get support on:
4+
5+
- [our discord server](https://discord.gg/JVyyDukQqV)
6+
- [GitHub discussions](https://github.com/ElBe-Development/logging-rs/discussions)
7+
- [GitHub issues](https://github.com/ElBe-Development/logging-rs/issues)

.github/auto_assign.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
addReviewers: false
3+
addAssignees: true
4+
assignees:
5+
- ElBe-Plaq

0 commit comments

Comments
 (0)