logbull 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (6) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +189 -0
  3. data/README.md +92 -0
  4. data/lib/logbull/version.rb +5 -0
  5. data/lib/logbull.rb +64 -0
  6. metadata +78 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 3a04d32a2321d71f22bb3abdd4ec92383f8f8f0dd937b6e5fae559da54236b5e
4
+ data.tar.gz: 4ad39141fcd088bc1e09c8b09538593067154f7b719a3b1ea4335049d62aeaef
5
+ SHA512:
6
+ metadata.gz: 62755af9f4e60bc27bed40a0174e6a81171b0c1d38b3589099c8e190f88188d57bb090bfa1b332a0a67c12933019e83d05b3ee300cbf53cdf9af857d22d199e0
7
+ data.tar.gz: 984917e1e3184d25c0d9a5f3c0e85d6e68e8f72fa3dcc2d454f468cd93959463c0fd029b784903c89a926429b1b5b71fae5a45c190dfd7acd42092662c9bdb7f
data/LICENSE ADDED
@@ -0,0 +1,189 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity granting the License.
13
+
14
+ "Legal Entity" shall mean the union of the acting entity and all
15
+ other entities that control, are controlled by, or are under common
16
+ control with that entity. For the purposes of this definition,
17
+ "control" means (i) the power, direct or indirect, to cause the
18
+ direction or management of such entity, whether by contract or
19
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
20
+ outstanding shares, or (iii) beneficial ownership of such entity.
21
+
22
+ "You" (or "Your") shall mean an individual or Legal Entity
23
+ exercising permissions granted by this License.
24
+
25
+ "Source" shall mean the preferred form for making modifications,
26
+ including but not limited to software source code, documentation
27
+ source, and configuration files.
28
+
29
+ "Object" shall mean any form resulting from mechanical
30
+ transformation or translation of a Source form, including but
31
+ not limited to compiled object code, generated documentation,
32
+ and conversions to other media types.
33
+
34
+ "Work" shall mean the work of authorship, whether in Source or
35
+ Object form, made available under the License, as indicated by a
36
+ copyright notice that is included in or attached to the work
37
+ (which shall not include communications that are individually
38
+ marked or otherwise designated in writing by the copyright owner
39
+ as "Not a Contribution").
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based upon (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and derivative works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control
58
+ systems, and issue tracking systems that are managed by, or on behalf
59
+ of, the Licensor for the purpose of discussing and improving the Work,
60
+ but excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ 2. Grant of Copyright License. Subject to the terms and conditions of
64
+ this License, each Contributor hereby grants to You a perpetual,
65
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
66
+ copyright license to use, reproduce, modify, merge, publish,
67
+ distribute, sublicense, and/or sell copies of the Work, and to
68
+ permit persons to whom the Work is furnished to do so, subject to
69
+ the following conditions:
70
+
71
+ The above copyright notice and this permission notice shall be
72
+ included in all copies or substantial portions of the Work.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" file as part of its
108
+ distribution, then any Derivative Works that You distribute
109
+ must include a readable copy of the attribution notices
110
+ contained within such NOTICE file, excluding those notices
111
+ that do not pertain to any part of the Derivative Works,
112
+ in at least one of the following places: within a NOTICE file
113
+ distributed as part of the Derivative Works; within the Source
114
+ form or documentation, if provided along with the Derivative
115
+ Works; or, within a display generated by the Derivative Works,
116
+ if and wherever such third-party notices normally appear. The
117
+ contents of the NOTICE file are for informational purposes only
118
+ and do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright notice to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Support. You may choose to offer, and to
167
+ charge a fee for, warranty, support, indemnity or other liability
168
+ obligations and/or rights consistent with this License. However, in
169
+ accepting such obligations, You may act only on Your own behalf and
170
+ on Your sole responsibility, not on behalf of any other Contributor,
171
+ and only if You agree to indemnify, defend, and hold each Contributor
172
+ harmless for any liability incurred by, or claims asserted against,
173
+ such Contributor by reason of your accepting any such warranty or support.
174
+
175
+ END OF TERMS AND CONDITIONS
176
+
177
+ Copyright 2024 LogBull Team
178
+
179
+ Licensed under the Apache License, Version 2.0 (the "License");
180
+ you may not use this file except in compliance with the License.
181
+ You may obtain a copy of the License at
182
+
183
+ http://www.apache.org/licenses/LICENSE-2.0
184
+
185
+ Unless required by applicable law or agreed to in writing, software
186
+ distributed under the License is distributed on an "AS IS" BASIS,
187
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
188
+ See the License for the specific language governing permissions and
189
+ limitations under the License.
data/README.md ADDED
@@ -0,0 +1,92 @@
1
+ # LogBull Ruby
2
+
3
+ <div align="center">
4
+
5
+ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
6
+ [![Gem Version](https://badge.fury.io/rb/logbull.svg)](https://badge.fury.io/rb/logbull)
7
+
8
+ A Ruby library for sending logs to [LogBull](https://github.com/logbull/logbull) - a simple log collection system.
9
+
10
+ </div>
11
+
12
+ ## ⚠️ Early Development Notice
13
+
14
+ This is an **early placeholder release** to reserve the gem name. The full implementation is coming soon.
15
+
16
+ For production use, please check back later or watch this repository for updates.
17
+
18
+ ## Planned Features
19
+
20
+ - **Simple API**: Easy-to-use logging interface
21
+ - **Async sending**: Non-blocking log transmission with automatic batching
22
+ - **Context support**: Attach persistent context to logs
23
+ - **Thread-safe**: Safe for concurrent use
24
+ - **Multiple integrations**: Support for popular Ruby logging frameworks
25
+
26
+ ## Installation
27
+
28
+ Add this line to your application's Gemfile:
29
+
30
+ ```ruby
31
+ gem 'logbull'
32
+ ```
33
+
34
+ And then execute:
35
+
36
+ ```bash
37
+ bundle install
38
+ ```
39
+
40
+ Or install it yourself as:
41
+
42
+ ```bash
43
+ gem install logbull
44
+ ```
45
+
46
+ ## Quick Start (Planned API)
47
+
48
+ ```ruby
49
+ require 'logbull'
50
+
51
+ # Initialize logger
52
+ config = LogBull::Config.new(
53
+ project_id: 'YOUR_PROJECT_ID',
54
+ host: 'http://localhost:4005',
55
+ api_key: 'YOUR_API_KEY', # optional
56
+ log_level: :info
57
+ )
58
+
59
+ logger = LogBull::Logger.new(config)
60
+
61
+ # Log messages
62
+ logger.info('User logged in', { user_id: '12345', username: 'john_doe' })
63
+ logger.error('Database error', { error: 'Connection timeout', database: 'users_db' })
64
+
65
+ # Shutdown
66
+ logger.shutdown
67
+ ```
68
+
69
+ ## Development Status
70
+
71
+ This gem is currently in early development. The API shown above is planned but not yet fully implemented.
72
+
73
+ ## Contributing
74
+
75
+ We welcome contributions! Please feel free to submit issues and pull requests to the [GitHub repository](https://github.com/logbull/logbull-ruby).
76
+
77
+ ## Related Projects
78
+
79
+ - [LogBull Server](https://github.com/logbull/logbull) - The main LogBull server
80
+ - [LogBull Go](https://github.com/logbull/logbull-go) - Go client library (production ready)
81
+ - [LogBull Python](https://github.com/logbull/logbull-python) - Python client library
82
+ - [LogBull JavaScript](https://github.com/logbull/logbull-js) - JavaScript/TypeScript client library
83
+
84
+ ## License
85
+
86
+ Apache 2.0 License - see [LICENSE](LICENSE) file for details.
87
+
88
+ ## Links
89
+
90
+ - [GitHub Repository](https://github.com/logbull/logbull-ruby)
91
+ - [Issue Tracker](https://github.com/logbull/logbull-ruby/issues)
92
+ - [LogBull Documentation](https://logbull.com)
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module LogBull
4
+ VERSION = "0.0.1"
5
+ end
data/lib/logbull.rb ADDED
@@ -0,0 +1,64 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "logbull/version"
4
+
5
+ # LogBull is a Ruby client library for sending logs to LogBull server.
6
+ #
7
+ # This is an early placeholder release to reserve the gem name.
8
+ # Full implementation coming soon.
9
+ #
10
+ # For more information, visit: https://github.com/logbull/logbull-ruby
11
+ module LogBull
12
+ class Error < StandardError; end
13
+
14
+ # Placeholder configuration class
15
+ class Config
16
+ attr_accessor :project_id, :host, :api_key, :log_level
17
+
18
+ def initialize(project_id:, host:, api_key: nil, log_level: :info)
19
+ @project_id = project_id
20
+ @host = host
21
+ @api_key = api_key
22
+ @log_level = log_level
23
+ end
24
+ end
25
+
26
+ # Placeholder logger class
27
+ class Logger
28
+ def initialize(config)
29
+ @config = config
30
+ warn "[LogBull] This is a placeholder release. Full implementation coming soon."
31
+ end
32
+
33
+ def debug(message, fields = {})
34
+ log(:debug, message, fields)
35
+ end
36
+
37
+ def info(message, fields = {})
38
+ log(:info, message, fields)
39
+ end
40
+
41
+ def warning(message, fields = {})
42
+ log(:warning, message, fields)
43
+ end
44
+
45
+ def error(message, fields = {})
46
+ log(:error, message, fields)
47
+ end
48
+
49
+ def critical(message, fields = {})
50
+ log(:critical, message, fields)
51
+ end
52
+
53
+ def shutdown
54
+ # Placeholder
55
+ end
56
+
57
+ private
58
+
59
+ def log(level, message, fields)
60
+ # Placeholder implementation - just prints to console
61
+ puts "[LogBull][#{level.upcase}] #{message} #{fields.inspect unless fields.empty?}"
62
+ end
63
+ end
64
+ end
metadata ADDED
@@ -0,0 +1,78 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: logbull
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - LogBull Team
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: rake
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - "~>"
17
+ - !ruby/object:Gem::Version
18
+ version: '13.0'
19
+ type: :development
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - "~>"
24
+ - !ruby/object:Gem::Version
25
+ version: '13.0'
26
+ - !ruby/object:Gem::Dependency
27
+ name: rspec
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - "~>"
31
+ - !ruby/object:Gem::Version
32
+ version: '3.0'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '3.0'
40
+ description: A Ruby library for sending logs to LogBull - a simple log collection
41
+ system. This is an early placeholder release.
42
+ email:
43
+ - support@logbull.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - LICENSE
49
+ - README.md
50
+ - lib/logbull.rb
51
+ - lib/logbull/version.rb
52
+ homepage: https://github.com/logbull/logbull-ruby
53
+ licenses:
54
+ - Apache-2.0
55
+ metadata:
56
+ homepage_uri: https://github.com/logbull/logbull-ruby
57
+ source_code_uri: https://github.com/logbull/logbull-ruby
58
+ changelog_uri: https://github.com/logbull/logbull-ruby/blob/main/CHANGELOG.md
59
+ bug_tracker_uri: https://github.com/logbull/logbull-ruby/issues
60
+ documentation_uri: https://github.com/logbull/logbull-ruby
61
+ rdoc_options: []
62
+ require_paths:
63
+ - lib
64
+ required_ruby_version: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: 2.7.0
69
+ required_rubygems_version: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: '0'
74
+ requirements: []
75
+ rubygems_version: 3.6.9
76
+ specification_version: 4
77
+ summary: Ruby client library for LogBull log collection system
78
+ test_files: []