Created
April 22, 2013 02:03
-
-
Save s992/5431987 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
string = "I'm a string!"; | |
numeric = 12345; | |
boolean = true; | |
chromelogger.log( string, numeric, boolean ); | |
</cfscript> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
string = "I'm a string!"; | |
numeric = 12345; | |
boolean = true; | |
chromelogger.log( string ); | |
chromelogger.log( numeric ); | |
chromelogger.log( boolean ); | |
</cfscript> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
warn = "I'm a warning!"; | |
error = "I'm an error!"; | |
chromelogger.warn( warn ); | |
chromelogger.error( error ); | |
</cfscript> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
chromelogger.group( "This is my group label." ); | |
chromelogger.log( "Just a normal log..." ); | |
chromelogger.warn( "Uh-oh.." ); | |
chromelogger.error( "We broke something!" ); | |
chromelogger.groupEnd(); | |
</cfscript> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
user = new User(); | |
address = new Address(); | |
chromelogger.group( "Populating a user record..." ); | |
user.setID( 123 ); | |
user.setName( "Sean" ); | |
// Let's try to set a non-existent property and then log the error. | |
try { | |
user.setAge( 26 ); | |
} catch( Any e ) { | |
chromelogger.error( "Uh-oh! We caught an error:" ); | |
chromelogger.log( e ); | |
} | |
address.setID( 456 ); | |
address.setStreet( "Test St." ); | |
// How does it work with some recursion? | |
user.setAddress( address ); | |
address.setUser( user ); | |
// Just fine! | |
chromelogger.log( user ); | |
chromelogger.groupEnd(); | |
</cfscript> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
query = new com.adobe.coldfusion.query(); | |
query.setDatasource( "cfartgallery" ); | |
query.setSQL( "SELECT * FROM artists" ); | |
query = query.execute().getResult(); | |
chromelogger.log( query ); | |
struct = { | |
"key" = "value" | |
, "array" = [ | |
"let's", "try", "a", "nested", "array" | |
] | |
}; | |
chromelogger.log( struct ); | |
array = [ | |
1, 2, 3, 4, 5, { "nested" = "structs too?" } | |
]; | |
chromelogger.log( array ); | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment