Pantheios rolling file appender? - c

I have used log4C and it is great. However, I would like to get Pantheios working as well and was wondering if it supports a rolling file appender? I mean if I have something logging to file in Production I need it to be a rolling file?
Also, stupid question but let's say I have DEBUG, INFO and ERROR type logs when using Pantheios, how do you limit to only seeing INFO (for example) using some "sort of config file" like with log4C?
Thanks for the help, any advise would be greatly appreciated ;-)
Lynton

I started evaluating Pantheios since yesterday. Therefore my reply may not be perfect.
1) For rolling file, you can customize the back-end to roll the file by yourself (pantheios_be_file_setFilePath), or use log4c as your logging transport in the back-end. :-)
2) Customize the front-end and make pantheios_fe_isSeverityLogged() function return true only for INFO. You can make it configurable by picking up the settings from .ini file.

Related

How can I make a 'clone' of the gnomAD browser? Can anyone help me on how to do this implementation?

The gnomAD browser open repository is very complex and I'm having trouble figuring out how to start or what steps to follow to do it.
Basically, I have my own data, so I would like to try to create my own type of exome aggregation database, and the idea was to try to replicate gnomAD and take advantage of its open code source, eventually being able to load my data into it.
gnomAD repo: https://github.com/broadinstitute/gnomad-browser
Thanks in advance!
Note: My background is in bioinformatics, but I don't have much knowledge of web development.
I believe I should begin by following the instructions available in the CONTRIBUTING.md file of the gnomAD repository, is that right?

The Babel-core module not working with Lingui

I am new to the concept of Localizing my react-application. After doing some research online, It seems as if jsLingui is the best library to use and implement translation on my React application. Following tutorials from https://lingui.js.org/tutorials/react.html , everything seems pretty straight forward. but when I run the command
$ lingui extract , I get the error :
module.js:557
throw err;
Error: Cannot find module 'babel-core'
at Function.Module._resolveFilename (module.js:555:15)
at Function.Module._load (module.js:482:25) .....
I have tried re-installing the babel-core , and it shows installed. Even when I check on my file system, I see the folder as node_modules/babel-core .
I also checked my package.json and I see "babel-core": "^6.26.3" as part of my devDependencies. Please any ideas around this will be helpful.
Beside, the pressing question, I also have a few other questions;
1) In the documentation, I am not sure on where to keep .babelrc file created. I hope it is suppose to be inside my babel-core folder.
2) When I was reading on the jslingui library, I discover that, they are still working on something that will help separate translations to be done page by page. I do not know whether this task is completed or still under development because, I am really interested in this one since my application really big and loading the whole translation at all times might become a real issue.
3) What if I have text in one part of my application which is exactly the same as in another part of my application, is it possible to write it in one section and call the id in another part to give me back the information?? or it is out of scope of the library .
4) I am building a social platform therefore I have information coming from the DB, which I do not know the content therefore such information can not be translated using jslingui just as it is. I will like to introduce some translation to this information( similar to what is happening on Facebook). I know this task needs some serious Artificial intelligence in the areas of natural language processing and machine learning. Please, Any good library that I can use to help my application translate only the portions of data provided to it( definitely information coming from DB)??. I have tried googling on this but I got nothing concrete( NB: I do not want Google Translate because, It will help to translate the whole page + names etc) which will mess-up the user experience of my application
jslingui
Thanks
I have tried re-installing the babel-core , and it shows installed. Even when I check on my file system, I see the folder as node_modules/babel-core . I also checked my package.json and I see "babel-core": "^6.26.3" as part of my devDependencies. Please any ideas around this will be helpful.
If you've installed #lingui/cli globally, please remove it and reinstall locally. If you use Babel 7 (your plugins/preset start with #babel/), then you need to install babel-core#^7.0.0-bridge.0 and #babel/core. Both locally as devDependencies. What also helped in some cases is good old turn it off and on again: rm -rf node_modules and reinstall everything...
1) In the documentation, I am not sure on where to keep .babelrc file created. I hope it is suppose to be inside my babel-core folder.
You should keep it in the root of your repository (next to package.json) unless you have specific needs.
2) When I was reading on the jslingui library, I discover that, they are still working on something that will help separate translations to be done page by page. I do not know whether this task is completed or still under development
It's still under development. However, it's a bit different - it helps you create separate message files, but not automatically. That's something we need to solve in further versinons.
3) What if I have text in one part of my application which is exactly the same as in another part of my application, is it possible to write it in one section and call the id in another part to give me back the information?
You have two options. Either you're using generated message IDs:
// App.js
<Trans>Hello World</Trans>
// Component.js uses the same message
<Trans>Hello World</Trans>
In this case, you only need to translate Hello World once, because messages are grouped when collected from source files.
Other option is that you're using custom IDs:
// App.js - define message
<Trans id="msg.hello">Hello World</Trans>
// Component.js - use message
<Trans id="msg.hello" />
4) I am building a social platform therefore I have information coming from the DB, which I do not know the content therefore such information can not be translated using jslingui just as it is. ...
I can't recommend any approach here, but it seems you need to use a machine translation. Either Google Translate or a better one, if you manage to find it. My guess it'll be either low-quality or expensive because as you said, this isn't a trivial task.

How does logging in managed VMs work?

I'm reading Google's docs on logging in managed VMs, and they're rather thin on detail, and I have more questions than answers after reading:
Files in /var/log/app_engine/custom_logs are picked up automatically it says – is this path pre-existing or do you also have to mkdir -p it?
Do I have to deal with log rotation/truncation myself?
How large can the files be?
If you write a file ending in .log.json and some bit of it is corrupt, does that break the whole file or will Google pick up the bits that can be read?
Is there a performance benefit/cost to log things this way, over using APIs?
UPDATE: I managed to have logs show up in the log viewer, but only when logging files with the .log suffix, whenever I try .log.json they are not being picked up and I can't see any errors anywhere. The JSON output seems fine, and conforms to the requirement of having one object per line. Does anyone know how to debug this?

MongoDb and Symfony2.4 file is not stored in Gridfs

I have implemented the file upload functionality with reference to this link
http://www.slideshare.net/mongodb/mongo-db-bangalore-2012-15070802
But the file is not stored into the Gridfs.
I had done some research for the same and also with reference to this blog post
http://php-and-symfony.matthiasnoback.nl/2012/10/uploading-files-to-mongodb-gridfs-2/
But again, unfortunately, I stuck with this issue since last from 15 days
please help.
Please take a look at KnpLabs/Gaufrette and the related KnpLabs/KnpGaufretteBundle
The Gaufrette bundle provides a level of abstraction around file systems and, it helped me get file-oriented operations up and running quickly. I found it very useful, and in fact the Symfony CMS package leverages this bundle. It may help you out as well.

Unable to Upload Large File in ASP.Net Web Application (DotNetNuke), Web.Config is set for size and execution

I am a MS Azure VM user and am trying to get help with an issue where even thought in my Web.Config I have set the correct file size/request (set to 128MB) and execution time (9000), when I upload a file (just 32MB) via the asp.net file upload control in it fails with a 403 error (file not found). I have tried everything and am stumped. I am MCSD and MCSE so I know my way around so I am wondering if it is a Azure VM issue/Configuration item I am missing. Any assistance finding a solution would be great. This is a critical issue that is preventing a software sale from going through and I really need to find a fix before they decide to move away from our solution. We are a small startup so paying MS $$$ for support is something we are trying to avoid if at all possible... Thank you in advance for your assistance...
I suspect you are running into an issue with the size of the ASPNETTEMP folder. See http://blogs.msdn.com/b/kwill/archive/2011/07/18/how-to-increase-the-size-of-the-windows-azure-web-role-asp-net-temporary-folder.aspx for a complete solution showing how to configure an Azure webrole to upload large files via the fileupload control.
Also, in terms of paying for support, it is only $29 per month. If you spend even 30 minutes trying unsuccessfully to troubleshoot something yourself, then the price of support will pay for itself. Just something to think about...

Resources