Is there any simple way how to log actions and states from Redux to a file? I found this awesome logger https://github.com/evgenyrodionov/redux-logger, but it seems to be used only for logging to console.
You can't simply log to a file since your application is executed by the browser. If you want to export logs to a log file, you have to add some mechanism to send back this information to server. Then server will be able to put this infos in a file.
Decorate your logger to intercept any log
store any log to a state
JSON.stringify your state
create ObjectURL from your state. (MDN)
Download it from <a download="logs.json" src="${objecturl}" />
Looks like redux-logger accepts a logger parameter where you can specify your own console implementation.
Related
When error occurs, I want to see the data payload uploaded by users.
I wasn't able to find the post/put/patch data in apm report. (kibana)
Is there an option I need to turn on for this?
Most agents have a CaptureBody config option, with that you can capture the request body. It's off by default - you can set it to error.
I linked the Java docs, you should be able to find the same config for (I think all) other agents.
I want to make sure some of the encrypted variables does not appear in airflow log.
I am passing AWS keys to Exasol Export sql, in the Airflow log it is getting printed.
Currently, this is not possible out-of-the-box. You can, however, configure your own Python Logger and use that class by changing logging_config_class property in airflow.cfg file.
Example here: Mask out sensitive information in python log
Are the AWS keys sent as part of the data for SQL export or are they sent for the connection?
If they are sent for connection, then hiding these credentials is possible. You simply would have to create a connection and send export the data from the connection.
I'm using rga to get some data from Google Analytics. From the repo:
The principle of this package is to create an instance of the API Authentication, which is a S4/5-class (utilizing the setRefClass). This instance then contains all the functions needed to extract data, and all the data needed for the authentication and reauthentication. The class is in essence self sustaining.
The package creates and saves a local instance using:
rga.open(instance="ga", where="~/ga.rga")
When I try to knit, however, I get an error that the ga object (what would be the instance) is not found. The code works when I run the chunks in RStudio, however—I believe the error is related to this aspect:
[The command above] will check if the instance is already created, and if it is, it'll prepare the token. If the instance is not created [...] it will redirect the client to a browser for authentication with Google.
My guess is that knitr can't perform that last step and so, the object is never created.
How can I make this work? I'm thinking that there might be a way to load the local ga.rga file to bypass browser authentication.
You can bypass browser authentication by passing the client id and client secret key that you can get it from Google API console. Saving a local auth file in the dev env is always risky. You can try this code, this uses Google API and also saves the local instance -
rga.open(instance = "ga",
client.id = "<contains apps.googleusercontent.com>",
client.secret =<your secret key>, where ="~/ga.rga" )
Also ensure that desktop option setting is enabled in Google API console
we are have written one custom input language translator SSRS extension which gets input and convert it into another language and send back. In this extension we have written a code to write error messages using event logger. When we running our SSRS reports they are showing message error!. But we are not getting any error in event logger only in SSRS trace log it returns "Data not found at parameter 5".
Following is sample asp.net code. Please do let us know permissions needed on extension so that we can write event log. We are getting error at Eventlog.SourceExists in below code.
System.Diagnostics.EventLogPermission pEventLog = new EventLogPermission(System.Security.Permissions.PermissionState.Unrestricted);
pEventLog.Assert();
if (!EventLog.SourceExists("Report Server"))
{
myLog = new EventLog();
myLog.Source = "Report Server";
}
According to Microsoft, you will not be able to acquire EventLogPermission unless the process is running with Administrator permissions.
https://msdn.microsoft.com/en-us/library/system.diagnostics.eventlogpermission(v=vs.110).aspx
This sounds pretty risky to me. You might want to use a different logging mechanism (like Log4Net, etc).
I had applied the following code as said by you :
byte[] b = YourByteArrayFromDb;
File.WriteAllBytes(MyFilePath, b);
But I am receiving an exception "Access to the path is denied". How do I solve this using ASP.Net with C# ? And is there any format to set the path as string ?
There is file access audit in Windows. You can use it to get detailed info about access faults. All events will be collected into Security Event Log. Steps to achieve:
Define audit on the "C:\Users\attilah\" directory or whole disk via Property->Security->Audit
Switch on audit in the Local Security Policy (Control_Panel->Administrative_Tools)
Look for events in the Security Event Log
Second method is using Process Monitor by Mark Russinovich (www.sysinternals.com)
Apply any method to diagnose a problem.
I think The error message is loud and clear. You DONT have permission to write to that path. Check the permission for the user under which you are trying to write the file.
I have recently run into the same problem, when trying to edit a file copied from a CD-ROM. The file still had its Read-Only attribute on, which caused the very same error.