Troubleshooting AppHarbor's "LogEntries" Add-On - appharbor

I've configured everything with LogEntries and log4net according to this article: https://logentries.com/doc/appharbor/
However, in my LogEntries panel, I only see events from the IIS log - nothing that I'm logging from my application using log4net. Can someone suggest troubleshooting steps so my custom events will start showing up?

Few things to check here, what version of the logentries.log4net nuget did you install? You can check this if you're using VS in your Nuget package manager. (Note that there's only v2.4.0) But there is an old library upto v2.3.9 called le_log4net which is deprecated, I have to change the title on the package. Secondly, if you paste the content of your web/app.config, only important parts are the log4net block and you appSettings. Lastly, be sure to place the following in your AssemblyInfo.cs as its sometimes overlooked.
[assembly: log4net.Config.XmlConfigurator(ConfigFile="Web.config", Watch = true)]
You can email me at mark#logentries.com or use our in-app support (I'm with Logentries and wrote the .NET libs.) as it may be quicker than debugging on here. Although its no harm doing it here so as to keep the solution public.

Related

Domino OSGI Update Site Creation

This is a continuation of a question I asked a few days ago regarding a designer connection for Domino OSGI dev and testing.
In eclipse, I do have the "debugging plug-in" installed (as mentioned by stwissel), and I am fairy certain that it is configured properly.
In a second attempt, I tried to export my plug-in in an update site.
1. import plug-in to feature
2. import feature to update site
3. build update site
I first tried to install using My Widgets in the notes sidebar. I did not get the thing to run with that so, then went into designer and installed it there directly, also nothing.
current stand
I built the update site and deployed using an nsf Update Site as a widget. I use this for openNTF Domino API, the ExtLibs -- it is comfortable and I like it.
I can verify that the feature is available in the application Management window of designer.
3 I expect to see those libraries in the xsp.properties page generation tab, but do not.
questions
1. Am I missing something?
2. Must I add some sort of class/code/flag in order to choose this library/plug-in in designer?
3. How can I best verify that the plug in and not just the feature is installed?
if your XspLibrary is not a 'global' one you probably won't see the activator run until the first nsf that uses it activates it.
seeing as you can't select it in an nsf this is probably why no nsf is ever activating it
can I ask have you correctly defined the library as an extension of com.ibm.commons.Extensions
as type
com.ibm.xsp.Library
if you don't define the extension you will not see it in the list of libraries.
also you must make sure you set the plugin settings to export the XspLibrary class (or package of the class) otherwise designer can't use the class
see this article on the domino designer wiki for an overview of necessary steps to correctly set up the XspLibrary plugin. the manifest.mf / plugin.xml settings are important.
another thing to double check, is to inspect the actual built plugin jar, using something like 7zip. you can open it up like a zip and have a look to make sure the .class files are actually included in the jar. if your build settings are incorrect it may not include them in the jar properly. also make sure the manifest.mf and plugin.xml are in there properly
EDIT from Greg
This should be the link for a non-mobile user
When you setup the debug plugin, it should create an entry in the workspace directory of the Notes client and Domino server (I think down in the RCP directory). This entry points back to the Eclipse workspace. So you don't need to deploy the plug-in. You also should see a warning when loading Notes ( with rparams -console) or Domino on the console about the debug.
Also what I found: auto deployment via Widget works when the update site sits on a server via http or nrpc. It doesn't when it is specified as file:/// so I run a Apache http on local (I need it for other stuff too, so no big deal for me).
I'll check the exact settings when I get back to my Dev workstation
You can identify if a plugin is installed via Help > About IBM Domino Designer, then clicking on the Plug-in Details button in the dialog.
Help > Support > View Log and View Trace should give more details. Trace is more detailed and allows you to write content, as we do for the OpenNTF Domino API. It may allow you to see how far through the code it's going.
That first message is in the XspLibrary class, in the constructor, just using a sysout
/**
* Constructor
*/
public XspLibrary() {
System.out.println("Loading org.openntf.domino.xsp library");
}
Hopefully that should help you see where it's failing.

WebAPI not writing to Trace.axd

I've got a WebAPI application (using RC), and I'm trying to write messages to the application trace. I tried following the tutorial here, which has me implementing ITraceWriter, and enabling it in Global.asax.
I did that, and when debugging, it hits breakpoints in my SimpleTracer class, but when I visit Trace.axd, my trace information section is blank. I also tried to write to the trace directly with System.Diagnostics.Trace.WriteLine("Hello, world!"); and it is still blank.
What could I be missing? Does the RC version perhaps not have this functionality?
Although not a direct answer to your question have you looked at using the official NuGet package (here) which Enables ASP.NET Web API tracing using System.Diagnostics? This was released as alpha back in Aug 2012 (sometime after the blog you followed to create your example) and is now at RC level.
There are instructions on how to install it here. Which may also assist you with your custom one should you wish to carry on with it.

Do Magento CE extensions work in PE?

Do Magneto CE extensions work in PE? The extensions I've tried installing in PE aren't working (they install but yield blank screens) and I can't find a straight answer; don't know if it's a problem on my end or if it's built in to Magento. Thanks in advance!!
Short answer is yes. CE modules can function correctly as part of PE, but it will depend greatly on what parts of the functionality it touches.
Things to do for any Magento issues like this:
Ensure the extension is enabled (check to ensure it's output is enabled and it's active) - see this post for reference (the post is how to turn off an extension, but it will point you in the right direction)
Refresh your cache
Ensure logging is on and check your logs for errors
Check your web server logs - where these are will depend on which web server you are running. Apache logs are generally in the error.log file under /var/logs/apache2 or /var/log/httpd
If all else fails, start debugging, by putting Mage::log() entries into the code and seeing what is logged and what isn't
Any extension could possibly work in any version, even if it isn't listed as such. Generally developers of extensions just list the versions that it has been tested in, but that doesn't mean it cant be used in others.
Best way to find out is install the module in your dev environment, and test to make sure it isn't overwriting/breaking any of the existing functionality.

How to debug magento application

I am working with Magento but i didn't find a very good way to debug my modules. For example, many time, i got a blank page with no php error and no apache error. For example, in backend, if one grid controller isn't well set, i don't have an error.
How to debug Magento module?
It sounds like you want to enable Developer mode. Add this to your .htaccess file:
SetEnv MAGE_IS_DEVELOPER_MODE "true"
You may also want to enable display errors in index.php:
ini_set('display_errors', 1);
The best way I have found to debug is with X-Debug in a local environment. You can also use log files to help debug in a production environment, if your unable to run X-Debug in the environment.
I've got a more detailed posting here:
https://gist.github.com/molotovbliss/2792c6c59410d75e5baf249b76413247
Consider also installing XDebug
This thread is old but useful.
Debugging tools and tricks are important as it saves lots of time of a developer.
Here is a compiled list My company Uses.
Use of Eclipse debugger: Magento is installed on a desktop using Eclipse debugger we apply breakpoints and other debugging tricks.
Use of Bug commerce as suggested in above post.
Use of Mage::log for error log and exception log.Also Magento Report files.
Use of Varien Object getData, debug.
Use of back trace: Mage::log(Varien_Debug::backtrace(true, true), null, 'backtrace.log')
Remote server level debugging.
var_dump PHP function to echo and exit.
If you are (want to be) a real Magento Developer, here is the best combination of IDE and plugin you must use to work on your Magento Projects.
First of all, phpStorm the best IDE you can find.
Exist a very helpful plugin called magicento that you can use auto-complete, find in path magento, create modules very quickly and without issue, other great stuff you can use with that plugin.
Of course need to install Xdebug (be carefully if you already run a project with ioncube, bc you need to make some trick there, Xdebug doens't work properly with ioncube loader).
This last item on the list is something I need to be reviewing but I think should be great to debugging porpoises, MagentoDebugger Chrome App.
Let me know if you need something else or any help installing some of the stuff.
Best,
Alejandro.
You can look in var/log/exception.log or system.log in the magento root. These are the directories for Magento excepetions and logs. Otherwise you might need to increase the php error log level.
Alan Storm created a Commerce Bug to help with some inline development issues.
Please try to use this magento debugger, it's chrome extension. http://w3site.org/magento_debugger it's realy speeds up a work. Just need to configure on the backend once and use Chrome extension.
Here easy to debug blocks, mails. Easy profile your extensions, etc.

Add Web Service Reference Weird Problem in WP7

I have a WP7 project in VS2010 pro/ultimate and I have added a web reference from another project on the same solution. The web service project is just a normal website project, I just created .ASMX file. I tested the service using web browser and it works fine.
The problem is, after I added this service as service reference, I cannot reference it in my WP7 project and I can't view it in Object Browser either as if it doesn't exist.
I use local URL like 'http://localhost:12345/WebService.asmx' when I added the service, VS can see all the methods and can add successfully. Very strange for me and I don't know how to solve this issue.
Anyone can give me any clue on this? Thanks very much.
I've had a similar issues before- on one machine, a restart was required, on another, I had to uninstall ALL of my SL stuff, then uninstall Vstudio, then reinstall and reapply any SL add-ons.
Then it worked fine.
Also had a friend with the same issue- uninstall all, then reinstall worked for him also.
I believe these were machines with pre-rtm SL and Phone bits on them.
I've had a similar problem. I created a WP7 project using VB.Net. I built a WCF Class web service, a client side proxy class, and then a WP7 application with the service reference. When I added the service reference, the code generating utility would not build the required Reference.svcmap file detail (it only created the header information). However the project would still compile, yet I couldn't reference the service in code as it didn't exist in the underlying files.
I tried recreating the WP7 project in C# and everything worked. My guess is that the VB implementation of WP7 might still have some issues, however that is a guess only. I'm keen to see if anyone else has had the same issue specific to the VB WP7 template or if it is something else.
I bumped into the same problem, but it was fixed after a reboot as suggested in this thread by dethSwatch.
I do remember that a silverlight SDK update was installed a bit earlier, maybe the reboot is required after the update?
I think this issue might be related to the January Update to the WP7 tools. I managed to fix this issue by installing the VS10-KB2486994-x86.exe fix found on the above page. That sorted the issue I had with generating a client side proxy for the WCF service I wanted to call. Hope this helps.

Resources