-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The plugin ConsolePlugin is already registered with LogDNA Browser #59
Comments
I am not a react expert but I am guessing that adding the logger init function in |
@TerryMooreII that worked like a charm: though it doesn't seem to be working the same way the api package does. i'm unsure how to get the env to show up in the metadata so i can use filters in the logdna UI like env:dev for my UI app. the typescript shows that the 2nd thing to pass is line context but i presume that is different than line identifiers? i am trying to get the behavior to match so i can have all my apps be able to be filtered in one view using env: in logdna |
you will probably need to add the |
@TerryMooreII that only makes it appear under context and not under the line identifiers. which does not allow for you to do env:dev in LogDNA to filter by the environment |
@BryantDavis1986 I just browsed through our logs and noticed that its not there either. I have a feeling the logger doesnt currently support this. I will make a ticket to get this added. |
Framework:
Created a brand new LogDNA key in the portal and am using that in the UI to connect to LogDNA.
Implementation:
typescript const [legger] = useState( logdna.init((process.env.config as unknown as Config).logDnaApiKey, { hostname: 'al-ui-2', app: 'al-ui-3', console: true, }) );
package json dependencies
Webpack common
`javascript
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: path.resolve(__dirname, '..', './src/index.tsx'),
resolve: {
extensions: ['.tsx', '.ts', '.js'],
},
module: {
rules: [
{
test: /.(ts|js)x?$/,
exclude: /node_modules/,
use: [
{
loader: 'babel-loader',
},
],
},
{
test: /.css$/,
use: ['style-loader', 'css-loader'],
},
{
test: /.(?:ico|gif|png|jpg|jpeg)$/i,
type: 'asset/resource',
},
{
test: /.(woff(2)?|eot|ttf|otf|svg|)$/,
type: 'asset/inline',
},
],
},
output: {
path: path.resolve(__dirname, '..', './build'),
filename: 'bundle.js',
},
plugins: [
new HtmlWebpackPlugin({
template: path.resolve(__dirname, '..', './src/index.html'),
}),
],
stats: 'errors-only',
};
`
env specific Webpack:
Error in UI(Firefox):
Firefox Console:
The text was updated successfully, but these errors were encountered: